mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 15:39:27 -05:00
Little improvements with QFont::PreferAntialias for the Labels in ChannelMsgItem/SubFileItem.
Added to display the file size after the filename on SubFileItem. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3662 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a612872d9b
commit
e1d9e1a4a8
@ -134,6 +134,7 @@ border-radius: 10px;}</string>
|
||||
<weight>75</weight>
|
||||
<italic>true</italic>
|
||||
<bold>true</bold>
|
||||
<stylestrategy>PreferAntialias</stylestrategy>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -154,6 +155,7 @@ p, li { white-space: pre-wrap; }
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
<stylestrategy>PreferAntialias</stylestrategy>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -436,6 +438,7 @@ border-radius: 10px;}</string>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "SubFileItem.h"
|
||||
|
||||
#include <retroshare/rsfiles.h>
|
||||
#include "util/misc.h"
|
||||
|
||||
|
||||
/****
|
||||
@ -93,7 +94,6 @@ SubFileItem::SubFileItem(const std::string &hash, const std::string &name, const
|
||||
|
||||
void SubFileItem::Setup()
|
||||
{
|
||||
connect( expandButton, SIGNAL( clicked( void ) ), this, SLOT( toggle ( void ) ) );
|
||||
connect( playButton, SIGNAL( clicked( void ) ), this, SLOT( play ( void ) ) );
|
||||
connect( downloadButton, SIGNAL( clicked( void ) ), this, SLOT( download ( void ) ) );
|
||||
connect( cancelButton, SIGNAL( clicked( void ) ), this, SLOT( cancel ( void ) ) );
|
||||
@ -208,12 +208,11 @@ void SubFileItem::updateItemStatic()
|
||||
{
|
||||
case SFI_STATE_ERROR:
|
||||
progressBar->setRange(0, 100);
|
||||
progressBar->setFormat(tr("ERROR"));
|
||||
progressBar->setFormat(tr("ERROR"));
|
||||
|
||||
playButton->setEnabled(false);
|
||||
downloadButton->setEnabled(false);
|
||||
cancelButton->setEnabled(false);
|
||||
expandButton->setEnabled(false);
|
||||
|
||||
progressBar->setValue(0);
|
||||
filename = "[" + tr("ERROR") + "] " + filename;
|
||||
@ -229,7 +228,6 @@ void SubFileItem::updateItemStatic()
|
||||
playButton->setEnabled(false);
|
||||
downloadButton->setEnabled(false);
|
||||
cancelButton->setEnabled(false);
|
||||
expandButton->setEnabled(false);
|
||||
|
||||
progressBar->setValue(0);
|
||||
filename = "[" + tr("EXTRA") + "] " + filename;
|
||||
@ -240,10 +238,9 @@ void SubFileItem::updateItemStatic()
|
||||
playButton->setEnabled(false);
|
||||
downloadButton->setEnabled(true);
|
||||
cancelButton->setEnabled(false);
|
||||
expandButton->setEnabled(false);
|
||||
|
||||
progressBar->setValue(0);
|
||||
filename = "[" + tr("REMOTE") + "] " + filename;
|
||||
filename = "[" + tr("REMOTE") + "] " + filename + " (" + misc::friendlyUnit(mFileSize) + ")";
|
||||
|
||||
break;
|
||||
|
||||
@ -251,7 +248,6 @@ void SubFileItem::updateItemStatic()
|
||||
playButton->setEnabled(false);
|
||||
downloadButton->setEnabled(false);
|
||||
cancelButton->setEnabled(true);
|
||||
expandButton->setEnabled(true);
|
||||
filename = "[" + tr("DOWNLOAD") + "] " + filename;
|
||||
|
||||
break;
|
||||
@ -260,10 +256,9 @@ void SubFileItem::updateItemStatic()
|
||||
playButton->setEnabled(true);
|
||||
downloadButton->setEnabled(false);
|
||||
cancelButton->setEnabled(false);
|
||||
expandButton->setEnabled(false);
|
||||
|
||||
progressBar->setValue(mFileSize / mDivisor);
|
||||
filename = "[" + tr("LOCAL") + "] " + filename;
|
||||
filename = "[" + tr("LOCAL") + "] " + filename + " (" + misc::friendlyUnit(mFileSize) + ")";
|
||||
|
||||
break;
|
||||
|
||||
@ -271,7 +266,6 @@ void SubFileItem::updateItemStatic()
|
||||
playButton->setEnabled(true);
|
||||
downloadButton->setEnabled(false);
|
||||
cancelButton->setEnabled(false);
|
||||
expandButton->setEnabled(true);
|
||||
filename = "[" + tr("UPLOAD") + "] " + filename;
|
||||
|
||||
break;
|
||||
@ -300,7 +294,6 @@ void SubFileItem::updateItemStatic()
|
||||
downloadButton->hide();
|
||||
cancelButton->setEnabled(true);
|
||||
cancelButton->setToolTip("Remove Attachment");
|
||||
expandButton->hide();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>518</width>
|
||||
<height>128</height>
|
||||
<width>464</width>
|
||||
<height>122</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -77,6 +77,7 @@ border-radius: 10px;}
|
||||
<weight>75</weight>
|
||||
<italic>true</italic>
|
||||
<bold>true</bold>
|
||||
<stylestrategy>PreferAntialias</stylestrategy>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -87,58 +88,6 @@ border-radius: 10px;}
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="downloadButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Download File</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Download</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/download.png</normaloff>:/images/download.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="playButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Play File</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Play</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/player_play.png</normaloff>:/images/player_play.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
@ -220,6 +169,58 @@ border: 1px solid black;
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="downloadButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Download File</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Download</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/download.png</normaloff>:/images/download.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="playButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Play File</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Play</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/player_play.png</normaloff>:/images/player_play.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
@ -241,32 +242,6 @@ border: 1px solid black;
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="expandButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Expand</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/textedit/zoomin.png</normaloff>:/images/textedit/zoomin.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="saveButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
@ -302,7 +277,7 @@ border: 1px solid black;
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
Loading…
Reference in New Issue
Block a user