mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 07:59:35 -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>
|
<weight>75</weight>
|
||||||
<italic>true</italic>
|
<italic>true</italic>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
|
<stylestrategy>PreferAntialias</stylestrategy>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -154,6 +155,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
|
<stylestrategy>PreferAntialias</stylestrategy>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<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"/>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
<include location="../images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "SubFileItem.h"
|
#include "SubFileItem.h"
|
||||||
|
|
||||||
#include <retroshare/rsfiles.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()
|
void SubFileItem::Setup()
|
||||||
{
|
{
|
||||||
connect( expandButton, SIGNAL( clicked( void ) ), this, SLOT( toggle ( void ) ) );
|
|
||||||
connect( playButton, SIGNAL( clicked( void ) ), this, SLOT( play ( void ) ) );
|
connect( playButton, SIGNAL( clicked( void ) ), this, SLOT( play ( void ) ) );
|
||||||
connect( downloadButton, SIGNAL( clicked( void ) ), this, SLOT( download ( void ) ) );
|
connect( downloadButton, SIGNAL( clicked( void ) ), this, SLOT( download ( void ) ) );
|
||||||
connect( cancelButton, SIGNAL( clicked( void ) ), this, SLOT( cancel ( void ) ) );
|
connect( cancelButton, SIGNAL( clicked( void ) ), this, SLOT( cancel ( void ) ) );
|
||||||
@ -213,7 +213,6 @@ void SubFileItem::updateItemStatic()
|
|||||||
playButton->setEnabled(false);
|
playButton->setEnabled(false);
|
||||||
downloadButton->setEnabled(false);
|
downloadButton->setEnabled(false);
|
||||||
cancelButton->setEnabled(false);
|
cancelButton->setEnabled(false);
|
||||||
expandButton->setEnabled(false);
|
|
||||||
|
|
||||||
progressBar->setValue(0);
|
progressBar->setValue(0);
|
||||||
filename = "[" + tr("ERROR") + "] " + filename;
|
filename = "[" + tr("ERROR") + "] " + filename;
|
||||||
@ -229,7 +228,6 @@ void SubFileItem::updateItemStatic()
|
|||||||
playButton->setEnabled(false);
|
playButton->setEnabled(false);
|
||||||
downloadButton->setEnabled(false);
|
downloadButton->setEnabled(false);
|
||||||
cancelButton->setEnabled(false);
|
cancelButton->setEnabled(false);
|
||||||
expandButton->setEnabled(false);
|
|
||||||
|
|
||||||
progressBar->setValue(0);
|
progressBar->setValue(0);
|
||||||
filename = "[" + tr("EXTRA") + "] " + filename;
|
filename = "[" + tr("EXTRA") + "] " + filename;
|
||||||
@ -240,10 +238,9 @@ void SubFileItem::updateItemStatic()
|
|||||||
playButton->setEnabled(false);
|
playButton->setEnabled(false);
|
||||||
downloadButton->setEnabled(true);
|
downloadButton->setEnabled(true);
|
||||||
cancelButton->setEnabled(false);
|
cancelButton->setEnabled(false);
|
||||||
expandButton->setEnabled(false);
|
|
||||||
|
|
||||||
progressBar->setValue(0);
|
progressBar->setValue(0);
|
||||||
filename = "[" + tr("REMOTE") + "] " + filename;
|
filename = "[" + tr("REMOTE") + "] " + filename + " (" + misc::friendlyUnit(mFileSize) + ")";
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -251,7 +248,6 @@ void SubFileItem::updateItemStatic()
|
|||||||
playButton->setEnabled(false);
|
playButton->setEnabled(false);
|
||||||
downloadButton->setEnabled(false);
|
downloadButton->setEnabled(false);
|
||||||
cancelButton->setEnabled(true);
|
cancelButton->setEnabled(true);
|
||||||
expandButton->setEnabled(true);
|
|
||||||
filename = "[" + tr("DOWNLOAD") + "] " + filename;
|
filename = "[" + tr("DOWNLOAD") + "] " + filename;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -260,10 +256,9 @@ void SubFileItem::updateItemStatic()
|
|||||||
playButton->setEnabled(true);
|
playButton->setEnabled(true);
|
||||||
downloadButton->setEnabled(false);
|
downloadButton->setEnabled(false);
|
||||||
cancelButton->setEnabled(false);
|
cancelButton->setEnabled(false);
|
||||||
expandButton->setEnabled(false);
|
|
||||||
|
|
||||||
progressBar->setValue(mFileSize / mDivisor);
|
progressBar->setValue(mFileSize / mDivisor);
|
||||||
filename = "[" + tr("LOCAL") + "] " + filename;
|
filename = "[" + tr("LOCAL") + "] " + filename + " (" + misc::friendlyUnit(mFileSize) + ")";
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -271,7 +266,6 @@ void SubFileItem::updateItemStatic()
|
|||||||
playButton->setEnabled(true);
|
playButton->setEnabled(true);
|
||||||
downloadButton->setEnabled(false);
|
downloadButton->setEnabled(false);
|
||||||
cancelButton->setEnabled(false);
|
cancelButton->setEnabled(false);
|
||||||
expandButton->setEnabled(true);
|
|
||||||
filename = "[" + tr("UPLOAD") + "] " + filename;
|
filename = "[" + tr("UPLOAD") + "] " + filename;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -300,7 +294,6 @@ void SubFileItem::updateItemStatic()
|
|||||||
downloadButton->hide();
|
downloadButton->hide();
|
||||||
cancelButton->setEnabled(true);
|
cancelButton->setEnabled(true);
|
||||||
cancelButton->setToolTip("Remove Attachment");
|
cancelButton->setToolTip("Remove Attachment");
|
||||||
expandButton->hide();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>518</width>
|
<width>464</width>
|
||||||
<height>128</height>
|
<height>122</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -77,6 +77,7 @@ border-radius: 10px;}
|
|||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
<italic>true</italic>
|
<italic>true</italic>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
|
<stylestrategy>PreferAntialias</stylestrategy>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -87,58 +88,6 @@ border-radius: 10px;}
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
@ -220,6 +169,58 @@ border: 1px solid black;
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
@ -241,32 +242,6 @@ border: 1px solid black;
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<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">
|
<widget class="QPushButton" name="saveButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
@ -302,7 +277,7 @@ border: 1px solid black;
|
|||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>40</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
|
Loading…
Reference in New Issue
Block a user