Moved font size definitions from ui files to default qss.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7734 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2014-12-07 16:27:24 +00:00
parent 90c3c24412
commit ea53e41c9c
11 changed files with 78 additions and 119 deletions

View File

@ -523,10 +523,6 @@ QAction *MainWindow::createPageAction(const QIcon &icon, const QString &text, QA
* Have to pass function pointer and slot, because we can't make slot of function pointer */
void MainWindow::addAction(QAction *action, FunctionType actionFunction, const char *slot)
{
QFont font;
font = action->font();
font.setPointSize(9);
action->setFont(font);
ui->toolBarAction->addAction(action);
if (slot) connect(action, SIGNAL(triggered()), this, slot);

View File

@ -147,11 +147,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<stylestrategy>PreferAntialias</stylestrategy>
</font>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
@ -182,7 +177,6 @@
<font>
<weight>75</weight>
<bold>true</bold>
<stylestrategy>PreferAntialias</stylestrategy>
</font>
</property>
<property name="text">
@ -201,8 +195,6 @@ p, li { white-space: pre-wrap; }
</widget>
<resources>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -268,6 +268,8 @@ void ChatWidget::init(const RsPeerId &peerId, const QString &title)
hist_chat_type = RS_HISTORY_TYPE_LOBBY;
messageCount = Settings->getLobbyChatHistoryCount();
ui->statusLabel->hide();
updateTitle();
} else {
hist_chat_type = RS_HISTORY_TYPE_PRIVATE ;
@ -1278,19 +1280,19 @@ void ChatWidget::updateStatus(const QString &peer_id, int status)
}
/* set font size for status */
if (RsPeerId(peer_id.toStdString()) == peerId) {
if (RsPeerId(peer_id.toStdString()) == peerId) {
// the peers status has changed
QString peerName ;
uint32_t stts ;
if(rsMsgs->getDistantChatStatus(RsGxsId(peerId),stts))
if(rsMsgs->getDistantChatStatus(RsGxsId(peerId),stts))
{
RsIdentityDetails details ;
if(rsIdentity->getIdDetails(RsGxsId(peerId),details))
if(rsIdentity->getIdDetails(RsGxsId(peerId),details))
peerName = QString::fromUtf8( details.mNickname.c_str() ) ;
else
peerName = QString::fromStdString(peerId.toStdString()) ;
peerName = QString::fromStdString(peerId.toStdString()) ;
}
else
peerName = QString::fromUtf8(rsPeers->getPeerName(peerId).c_str());

View File

@ -31,13 +31,7 @@
<widget class="QFrame" name="frame">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="lobbyinfo_label">
<property name="font">
<font>
<family>Tahoma</family>
<pointsize>12</pointsize>
</font>
</property>
<widget class="StyledLabel" name="lobbyInfoLabel">
<property name="text">
<string>A chat lobby is a decentralized and anonymous chat group. All participants receive all messages. Once the lobby is created you can invite other friends from the Friends tab.</string>
</property>
@ -254,6 +248,11 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget>
<class>HeaderFrame</class>
<extends>QFrame</extends>

View File

@ -104,7 +104,6 @@
<font>
<weight>75</weight>
<bold>true</bold>
<stylestrategy>PreferAntialias</stylestrategy>
</font>
</property>
<property name="text">
@ -143,11 +142,6 @@
</item>
<item>
<widget class="QLabel" name="filelabel">
<property name="font">
<font>
<stylestrategy>PreferAntialias</stylestrategy>
</font>
</property>
<property name="text">
<string notr="true">fileLabel</string>
</property>
@ -230,7 +224,6 @@
<widget class="QLabel" name="scoreLabel">
<property name="font">
<font>
<family>Tahoma</family>
<weight>75</weight>
<bold>true</bold>
</font>
@ -270,9 +263,6 @@
</item>
<item>
<widget class="QPushButton" name="downloadButton">
<property name="font">
<font/>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
@ -290,9 +280,6 @@
</item>
<item>
<widget class="QPushButton" name="playButton">
<property name="font">
<font/>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>

View File

@ -100,7 +100,7 @@
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QFrame" name="frame_2">
<widget class="QFrame" name="headFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
@ -148,12 +148,7 @@
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="peerNameLabel">
<property name="font">
<font>
<pointsize>14</pointsize>
</font>
</property>
<widget class="StyledLabel" name="peerNameLabel">
<property name="text">
<string notr="true">Peer Name</string>
</property>
@ -172,13 +167,9 @@
</property>
<property name="font">
<font>
<family>Tahoma</family>
<pointsize>9</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
<stylestrategy>PreferAntialias</stylestrategy>
<kerning>true</kerning>
</font>
</property>
<property name="text">
@ -190,20 +181,13 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="requestLabel">
<widget class="StyledLabel" name="requestLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>14</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>wants to be friend with you on RetroShare</string>
</property>
@ -662,6 +646,11 @@
</action>
</widget>
<customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget>
<class>AvatarWidget</class>
<extends>QLabel</extends>

View File

@ -35,7 +35,6 @@
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
<stylestrategy>PreferAntialias</stylestrategy>
</font>
</property>
<property name="text">
@ -159,32 +158,32 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="copyLinkButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>16777215</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Copy RetroShare Link</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/copyrslink.png</normaloff>:/images/copyrslink.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="copyLinkButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>16777215</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Copy RetroShare Link</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/copyrslink.png</normaloff>:/images/copyrslink.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="saveButton">
<property name="sizePolicy">

View File

@ -73,7 +73,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="nameLabel">
<widget class="StyledLabel" name="nameLabel">
<property name="palette">
<palette>
<active/>
@ -81,11 +81,6 @@
<disabled/>
</palette>
</property>
<property name="font">
<font>
<pointsize>21</pointsize>
</font>
</property>
<property name="text">
<string notr="true">Channel Name</string>
</property>
@ -333,6 +328,11 @@
<header>gui/gxschannels/GxsChannelFilesWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../images.qrc"/>

View File

@ -211,11 +211,6 @@
</item>
<item>
<widget class="GxsIdRSTreeWidget" name="threadTreeWidget">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
@ -290,11 +285,6 @@
<layout class="QGridLayout" name="postLayout">
<item row="0" column="7">
<widget class="QLabel" name="time_label">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string notr="true"/>
</property>
@ -401,11 +391,6 @@
</item>
<item row="0" column="9">
<widget class="QLabel" name="by_label">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string notr="true"/>
</property>
@ -514,11 +499,6 @@
<verstretch>10</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
</widget>
</widget>
</item>

View File

@ -171,7 +171,7 @@ CreateLobbyDialog QFrame#lobbyFrame {
background: white;
}
CreateLobbyDialog QLabel#lobbyinfo_label {
CreateLobbyDialog QLabel#lobbyInfoLabel {
border: 1px solid #DCDC41;
border-radius: 6px;
background: #FFFFD7;

View File

@ -24,56 +24,71 @@ QLabel#toasterLabel
font-weight: bold;
}
ChatWidget QFrame#titleBarFrame > QLabel#titleLabel, ChatWidget QFrame#titleBarFrame > QLabel#statusLabel
ChatWidget QFrame#titleBarFrame QLabel#titleLabel, ChatWidget QFrame#titleBarFrame QLabel#statusLabel
{
qproperty-fontSizeFactor: 125;
}
FriendsDialog QFrame#headFrame > QLabel#nicknameLabel
FriendsDialog QFrame#headFrame QLabel#nicknameLabel
{
qproperty-fontSizeFactor: 200;
}
ChatMsgItem QFrame#frame > QLabel#peerNameLabel
ChatMsgItem QFrame#frame QLabel#peerNameLabel
{
qproperty-fontSizeFactor: 175;
}
PeerItem QFrame#frame QFrame#peerFrame > QLabel#peerNameLabel
PeerItem QFrame#frame QFrame#peerFrame QLabel#peerNameLabel
{
qproperty-fontSizeFactor: 175;
}
PostedItem QFrame#frame > QLabel#titleLabel
SecurityItem QFrame#frame QFrame#headFrame QLabel#peerNameLabel, SecurityItem QFrame#frame QFrame#headFrame QLabel#requestLabel
{
qproperty-fontSizeFactor: 175;
}
PostedItem QFrame#frame QLabel#titleLabel
{
qproperty-fontSizeFactor: 150;
}
PostedItem QFrame#frame > QLabel#scoreLabel
PostedItem QFrame#frame QLabel#scoreLabel
{
qproperty-fontSizeFactor: 250;
}
GxsChannelPostItem QFrame#frame > QLabel#titleLabel
GxsChannelPostItem QFrame#frame QLabel#titleLabel
{
qproperty-fontSizeFactor: 125;
}
PluginItem QFrame#frame > QLabel#subjectLabel
PluginItem QFrame#frame QLabel#subjectLabel
{
qproperty-fontSizeFactor: 125;
}
RSettingsWin > QLabel#pageName
RSettingsWin QLabel#pageName
{
qproperty-fontSizeFactor: 125;
}
ConfCertDialog QFrame#frame QTabWidget QWidget > QLabel#servicePermissionsLabel
ConfCertDialog QFrame#frame QTabWidget QWidget QLabel#servicePermissionsLabel
{
qproperty-fontSizeFactor: 125;
}
GxsChannelPostsWidget QFrame#headFrame QLabel#nameLabel
{
qproperty-fontSizeFactor: 250;
}
CreateLobbyDialog QFrame#frame QLabel#lobbyInfoLabel
{
qproperty-fontSizeFactor: 150;
}
/* Color definitions */
ForumsDialog, GxsForumThreadWidget