Moved some internal stylesheets to the file Standard.qss.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5495 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-09-01 11:40:54 +00:00
parent d1785d5e2a
commit 32f918c213
7 changed files with 57 additions and 168 deletions

View file

@ -71,8 +71,6 @@ void GenCertDialog::init()
ui.genPGPuser->clear() ; ui.genPGPuser->clear() ;
QString titleString("<span style=\"font-size:17pt; font-weight:500;" "color:white;\">%1</span>");
std::list<std::string> pgpIds; std::list<std::string> pgpIds;
std::list<std::string>::iterator it; std::list<std::string>::iterator it;
bool foundGPGKeys = false; bool foundGPGKeys = false;
@ -91,20 +89,18 @@ void GenCertDialog::init()
if (foundGPGKeys) { if (foundGPGKeys) {
ui.no_gpg_key_label->hide(); ui.no_gpg_key_label->hide();
ui.progressBar->hide();
ui.new_gpg_key_checkbox->setChecked(false); ui.new_gpg_key_checkbox->setChecked(false);
setWindowTitle(tr("Create new Location")); setWindowTitle(tr("Create new Location"));
ui.genButton->setText(tr("Generate new Location")); ui.genButton->setText(tr("Generate new Location"));
ui.label_3->setText( titleString.arg( tr("Create a new Location") ) ) ; ui.headerLabel->setText(tr("Create a new Location"));
genNewGPGKey = false; genNewGPGKey = false;
} else { } else {
ui.no_gpg_key_label->show(); ui.no_gpg_key_label->show();
ui.new_gpg_key_checkbox->setChecked(true); ui.new_gpg_key_checkbox->setChecked(true);
ui.new_gpg_key_checkbox->setEnabled(false); ui.new_gpg_key_checkbox->setEnabled(false);
ui.progressBar->hide();
setWindowTitle(tr("Create new Identity")); setWindowTitle(tr("Create new Identity"));
ui.genButton->setText(tr("Generate new Identity")); ui.genButton->setText(tr("Generate new Identity"));
ui.label_3->setText( titleString.arg( tr("Create a new Identity") ) ) ; ui.headerLabel->setText(tr("Create a new Identity"));
genNewGPGKey = true; genNewGPGKey = true;
} }
newGPGKeyGenUiSetup(); newGPGKeyGenUiSetup();
@ -112,9 +108,6 @@ void GenCertDialog::init()
void GenCertDialog::newGPGKeyGenUiSetup() { void GenCertDialog::newGPGKeyGenUiSetup() {
QString titleStr("<span style=\"font-size:17pt; font-weight:500;"
"color:white;\">%1</span>");
if (ui.new_gpg_key_checkbox->isChecked()) { if (ui.new_gpg_key_checkbox->isChecked()) {
genNewGPGKey = true; genNewGPGKey = true;
ui.name_label->show(); ui.name_label->show();
@ -132,7 +125,7 @@ void GenCertDialog::newGPGKeyGenUiSetup() {
// ui.importIdentity_PB->hide() ; // ui.importIdentity_PB->hide() ;
setWindowTitle(tr("Create new Identity")); setWindowTitle(tr("Create new Identity"));
ui.genButton->setText(tr("Generate new Identity")); ui.genButton->setText(tr("Generate new Identity"));
ui.label_3->setText( titleStr.arg( tr("Create a new Identity") ) ) ; ui.headerLabel->setText(tr("Create a new Identity"));
} else { } else {
genNewGPGKey = false; genNewGPGKey = false;
ui.name_label->hide(); ui.name_label->hide();
@ -147,7 +140,7 @@ void GenCertDialog::newGPGKeyGenUiSetup() {
ui.importIdentity_PB->show() ; ui.importIdentity_PB->show() ;
setWindowTitle(tr("Create new Location")); setWindowTitle(tr("Create new Location"));
ui.genButton->setText(tr("Generate new Location")); ui.genButton->setText(tr("Generate new Location"));
ui.label_3->setText( titleStr.arg( tr("Create a new Location") ) ) ; ui.headerLabel->setText(tr("Create a new Location"));
} }
} }
@ -240,7 +233,6 @@ void GenCertDialog::genPerson()
std::string err_string; std::string err_string;
ui.no_gpg_key_label->setText(tr("Generating new GPG key, please be patient: this process needs generating large prime numbers, and can take some minutes on slow computers. \n\nFill in your GPG password when asked, to sign your new key.")); ui.no_gpg_key_label->setText(tr("Generating new GPG key, please be patient: this process needs generating large prime numbers, and can take some minutes on slow computers. \n\nFill in your GPG password when asked, to sign your new key."));
ui.no_gpg_key_label->show(); ui.no_gpg_key_label->show();
ui.progressBar->show();
ui.new_gpg_key_checkbox->hide(); ui.new_gpg_key_checkbox->hide();
ui.name_label->hide(); ui.name_label->hide();
ui.name_input->hide(); ui.name_input->hide();

View file

@ -17,47 +17,6 @@
<iconset resource="images.qrc"> <iconset resource="images.qrc">
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset> <normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
</property> </property>
<property name="styleSheet">
<string notr="true">QToolButton, QPushButton, QComboBox {
border-image: url(:/images/btn_26.png) 4;
border-width: 4;
padding: 0px 6px;
font-size: 12px;
}
*{
color: black;
}
QComboBox QAbstractItemView {
background-color:white;
}
QComboBox::down-arrow {
image: url(:/images/combobox_arrow.png);
}
QComboBox:drop-down
{
subcontrol-origin: padding;
subcontrol-position: top right;
border-left-style: none;
border-top-right-radius: 1px;
border-bottom-right-radius: 1px;
}
QToolButton:hover, QPushButton:hover, QComboBox:hover {
border-image: url(:/images/btn_26_hover.png) 4;
}
QToolButton:disabled, QPushButton:disabled, QComboBox::disabled {
color:gray;
}
QToolButton:pressed, QPushButton:pressed{
border-image: url(:/images/btn_26_pressed.png) 4;
}</string>
</property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
@ -73,19 +32,6 @@ border-image: url(:/images/btn_26_pressed.png) 4;
<height>30</height> <height>30</height>
</size> </size>
</property> </property>
<property name="styleSheet">
<string notr="true">QFrame#frame{
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #FEFEFE, stop:1 #E8E8E8);
border: 1px solid #CCCCCC;}</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
@ -116,19 +62,6 @@ border: 1px solid #CCCCCC;}</string>
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="2"> <item row="1" column="0" colspan="2">
<widget class="QProgressBar" name="progressBar">
<property name="maximum">
<number>0</number>
</property>
<property name="value">
<number>-1</number>
</property>
<property name="textVisible">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,0,0"> <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,0,0">
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
@ -197,7 +130,7 @@ border: 1px solid #CCCCCC;}</string>
</item> </item>
</layout> </layout>
</item> </item>
<item row="3" column="0"> <item row="2" column="0">
<widget class="QLabel" name="progress_label"> <widget class="QLabel" name="progress_label">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -210,42 +143,42 @@ border: 1px solid #CCCCCC;}</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="3" column="0">
<widget class="QLabel" name="genPGPuserlabel"> <widget class="QLabel" name="genPGPuserlabel">
<property name="text"> <property name="text">
<string>Use identity</string> <string>Use identity</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="3" column="1">
<widget class="QComboBox" name="genPGPuser"> <widget class="QComboBox" name="genPGPuser">
<property name="toolTip"> <property name="toolTip">
<string>Your profile is associated to a GPG key. RetroShare currently ignores DSA keys.</string> <string>Your profile is associated to a GPG key. RetroShare currently ignores DSA keys.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0"> <item row="4" column="0">
<widget class="QLabel" name="name_label"> <widget class="QLabel" name="name_label">
<property name="text"> <property name="text">
<string>Name</string> <string>Name</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="1"> <item row="4" column="1">
<widget class="QLineEdit" name="name_input"> <widget class="QLineEdit" name="name_input">
<property name="toolTip"> <property name="toolTip">
<string>Enter here your nickname</string> <string>Enter here your nickname</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="0"> <item row="5" column="0">
<widget class="QLabel" name="email_label"> <widget class="QLabel" name="email_label">
<property name="text"> <property name="text">
<string>Email</string> <string>Email</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="1"> <item row="5" column="1">
<widget class="QLineEdit" name="email_input"> <widget class="QLineEdit" name="email_input">
<property name="toolTip"> <property name="toolTip">
<string>Be careful: this email will be visible to your friends and friends <string>Be careful: this email will be visible to your friends and friends
@ -254,7 +187,7 @@ anonymous, you can use a fake email.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="0"> <item row="6" column="0">
<widget class="QLabel" name="password_label"> <widget class="QLabel" name="password_label">
<property name="toolTip"> <property name="toolTip">
<string>This Password is for GPG</string> <string>This Password is for GPG</string>
@ -264,7 +197,7 @@ anonymous, you can use a fake email.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="1"> <item row="6" column="1">
<widget class="QLineEdit" name="password_input"> <widget class="QLineEdit" name="password_input">
<property name="toolTip"> <property name="toolTip">
<string>Put a strong password here. This password protects your GPG key.</string> <string>Put a strong password here. This password protects your GPG key.</string>
@ -277,17 +210,17 @@ anonymous, you can use a fake email.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="0"> <item row="7" column="0">
<widget class="QLabel" name="location_label"> <widget class="QLabel" name="location_label">
<property name="text"> <property name="text">
<string>Location</string> <string>Location</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="1"> <item row="7" column="1">
<widget class="QLineEdit" name="location_input"/> <widget class="QLineEdit" name="location_input"/>
</item> </item>
<item row="9" column="1"> <item row="8" column="1">
<widget class="QLabel" name="label_location2"> <widget class="QLabel" name="label_location2">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
@ -309,7 +242,7 @@ anonymous, you can use a fake email.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="1"> <item row="9" column="1">
<widget class="QPushButton" name="genButton"> <widget class="QPushButton" name="genButton">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -317,9 +250,6 @@ anonymous, you can use a fake email.</string>
<height>26</height> <height>26</height>
</size> </size>
</property> </property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text"> <property name="text">
<string>Generate New Identity</string> <string>Generate New Identity</string>
</property> </property>
@ -329,7 +259,7 @@ anonymous, you can use a fake email.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="11" column="0" colspan="2"> <item row="10" column="0" colspan="2">
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@ -349,17 +279,13 @@ anonymous, you can use a fake email.</string>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QFrame" name="frame_2"> <widget class="QFrame" name="headerFrame">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>140</height> <height>140</height>
</size> </size>
</property> </property>
<property name="styleSheet">
<string notr="true">QFrame#frame_2{background-image: url(:/images/genbackground.png);}
</string>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
@ -374,7 +300,7 @@ anonymous, you can use a fake email.</string>
<number>3</number> <number>3</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="headerImage">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>128</width> <width>128</width>
@ -393,20 +319,21 @@ anonymous, you can use a fake email.</string>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="headerLayout">
<item> <item>
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="headerLabel">
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>Create a new Identity</string>
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Arial'; font-size:16pt; color:#ffffff;&quot;&gt;Create a new Identity&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="headerLabel2">
<property name="text"> <property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;

View file

@ -231,9 +231,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
config file RetroShare.conf */ config file RetroShare.conf */
connect(ui.actionQuit, SIGNAL(triggered()), this, SLOT(doQuit())); connect(ui.actionQuit, SIGNAL(triggered()), this, SLOT(doQuit()));
/* load the StyleSheet*/
Rshare::loadStyleSheet(Rshare::stylesheet());
QList<QPair<MainPage*, QAction*> > notify; QList<QPair<MainPage*, QAction*> > notify;
/* Create the Main pages and actions */ /* Create the Main pages and actions */

View file

@ -26,43 +26,6 @@
<iconset resource="../images.qrc"> <iconset resource="../images.qrc">
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset> <normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
</property> </property>
<property name="styleSheet">
<string notr="true">QToolButton, QPushButton, QComboBox {
border-image: url(:/images/btn_26.png) 4;
border-width: 4;
padding: 0px 6px;
font-size: 12px;
}
QComboBox QAbstractItemView {
background-color:white;
}
QComboBox::down-arrow {
image: url(:/images/combobox_arrow.png);
}
QComboBox:drop-down
{
subcontrol-origin: padding;
subcontrol-position: top right;
border-left-style: none;
border-top-right-radius: 1px;
border-bottom-right-radius: 1px;
}
QToolButton:hover, QPushButton:hover, QComboBox:hover {
border-image: url(:/images/btn_26_hover.png) 4;
}
QToolButton:disabled, QPushButton:disabled, QComboBox::disabled {
color:gray;
}
QToolButton:pressed, QPushButton:pressed{
border-image: url(:/images/btn_26_pressed.png) 4;
}</string>
</property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
@ -78,19 +41,6 @@ border-image: url(:/images/btn_26_pressed.png) 4;
<height>30</height> <height>30</height>
</size> </size>
</property> </property>
<property name="styleSheet">
<string notr="true">QFrame#frame{
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #FEFEFE, stop:1 #E8E8E8);
border: 1px solid #CCCCCC;}</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="1" column="0"> <item row="1" column="0">
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
@ -129,9 +79,6 @@ border: 1px solid #CCCCCC;}</string>
<height>26</height> <height>26</height>
</size> </size>
</property> </property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text"> <property name="text">
<string>Generate New Identity</string> <string>Generate New Identity</string>
</property> </property>

View file

@ -18,6 +18,28 @@ HeaderFrame > QLabel#headerLabel {
color: rgb(255, 255, 255); color: rgb(255, 255, 255);
} }
/* GenCertDialog */
GenCertDialog > QFrame#headerFrame {
background-image: url(:/images/genbackground.png);
}
GenCertDialog > QFrame#headerFrame > QLabel#headerLabel {
color: rgb(255, 255, 255);
}
GenCertDialog > QFrame#frame {
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FEFEFE, stop:1 #E8E8E8);
border: 1px solid #CCCCCC;
}
/* ProfileManager */
ProfileManager > QFrame#frame {
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FEFEFE, stop:1 #E8E8E8);
border: 1px solid #CCCCCC;
}
/* FriendsDialog */ /* FriendsDialog */
FriendsDialog QFrame#headerFrame { FriendsDialog QFrame#headerFrame {

View file

@ -87,7 +87,7 @@ Rshare::qt_msg_handler(QtMsgType type, const char *s)
/** Constructor. Parses the command-line arguments, resets Rshare's /** Constructor. Parses the command-line arguments, resets Rshare's
* configuration (if requested), and sets up the GUI style and language * configuration (if requested), and sets up the GUI style and language
* translation. */ * translation. */
Rshare::Rshare(QStringList args, int &argc, char **argv, QString dir) Rshare::Rshare(QStringList args, int &argc, char **argv, const QString &dir)
: QApplication(argc, argv) : QApplication(argc, argv)
{ {
qInstallMsgHandler(qt_msg_handler); qInstallMsgHandler(qt_msg_handler);
@ -345,6 +345,10 @@ Rshare::setSheet(QString sheet)
} }
/* Apply the specified GUI stylesheet */ /* Apply the specified GUI stylesheet */
_stylesheet = sheet; _stylesheet = sheet;
/* load the StyleSheet*/
loadStyleSheet(_stylesheet);
return true; return true;
} }

View file

@ -56,7 +56,7 @@ class Rshare : public QApplication
public: public:
/** Constructor. */ /** Constructor. */
Rshare(QStringList args, int &argc, char **argv, QString dir); Rshare(QStringList args, int &argc, char **argv, const QString &dir);
/** Destructor. */ /** Destructor. */
~Rshare(); ~Rshare();