changed the default style layout of profile creation dialog.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6736 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2013-09-13 17:19:34 +00:00
parent 0ae1a8a101
commit d076848f92
3 changed files with 79 additions and 102 deletions

View file

@ -35,6 +35,9 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);
ui.headerFrame->setHeaderImage(QPixmap(":/images/contact_new128.png"));
ui.headerFrame->setHeaderText(tr("Create a new Identity"));
connect(ui.new_gpg_key_checkbox, SIGNAL(clicked()), this, SLOT(newGPGKeyGenUiSetup())); connect(ui.new_gpg_key_checkbox, SIGNAL(clicked()), this, SLOT(newGPGKeyGenUiSetup()));
@ -90,7 +93,7 @@ void GenCertDialog::init()
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.headerLabel->setText(tr("Create a new Location")); ui.headerFrame->setHeaderText(tr("Create a new Location"));
genNewGPGKey = false; genNewGPGKey = false;
} else { } else {
ui.no_gpg_key_label->setVisible(!mOnlyGenerateIdentity); ui.no_gpg_key_label->setVisible(!mOnlyGenerateIdentity);
@ -98,21 +101,21 @@ void GenCertDialog::init()
ui.new_gpg_key_checkbox->setEnabled(true); ui.new_gpg_key_checkbox->setEnabled(true);
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.headerLabel->setText(tr("Create a new Identity")); ui.headerFrame->setHeaderText(tr("Create a new Identity"));
genNewGPGKey = true; genNewGPGKey = true;
} }
QString text = ui.headerLabel2->text() + "\n"; QString text = ui.header_label->text() + "\n";
if (mOnlyGenerateIdentity) { if (mOnlyGenerateIdentity) {
ui.new_gpg_key_checkbox->setChecked(true); ui.new_gpg_key_checkbox->setChecked(true);
ui.new_gpg_key_checkbox->hide(); ui.new_gpg_key_checkbox->hide();
ui.label->hide(); ui.genprofileinfo_label->hide();
text += tr("You can create a new identity with this form."); text += tr("You can create a new identity with this form.");
} else { } else {
text += tr("You can use an existing identity (i.e. a PGP key pair), from the list below, or create a new one with this form."); text += tr("You can use an existing identity (i.e. a PGP key pair), from the list below, or create a new one with this form.");
} }
ui.headerLabel2->setText(text); ui.header_label->setText(text);
newGPGKeyGenUiSetup(); newGPGKeyGenUiSetup();
} }
@ -133,7 +136,7 @@ void GenCertDialog::newGPGKeyGenUiSetup() {
ui.exportIdentity_PB->hide(); ui.exportIdentity_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.headerLabel->setText(tr("Create a new Identity")); ui.headerFrame->setHeaderText(tr("Create a new Identity"));
} else { } else {
genNewGPGKey = false; genNewGPGKey = false;
ui.name_label->hide(); ui.name_label->hide();
@ -149,7 +152,7 @@ void GenCertDialog::newGPGKeyGenUiSetup() {
ui.exportIdentity_PB->setEnabled(ui.genPGPuser->count() != 0); ui.exportIdentity_PB->setEnabled(ui.genPGPuser->count() != 0);
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.headerLabel->setText(tr("Create a new Location")); ui.headerFrame->setHeaderText(tr("Create a new Location"));
} }
} }
@ -251,6 +254,7 @@ void GenCertDialog::genPerson()
ui.genButton->hide(); ui.genButton->hide();
ui.label_location2->hide(); ui.label_location2->hide();
ui.importIdentity_PB->hide(); ui.importIdentity_PB->hide();
ui.genprofileinfo_label->hide();
setCursor(Qt::WaitCursor) ; setCursor(Qt::WaitCursor) ;

View file

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>664</width> <width>691</width>
<height>474</height> <height>392</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -33,37 +33,12 @@
</size> </size>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <property name="horizontalSpacing">
<widget class="QLabel" name="label"> <number>0</number>
<property name="font"> </property>
<font> <item row="2" column="0">
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>You can install retroshare on different locations using the same identity. For this, just export the selected identity, and import it on the new computer, then create a new location with it.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="9" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" colspan="2"> <item row="0" column="0" colspan="2">
<widget class="QLabel" name="no_gpg_key_label"> <widget class="QLabel" name="no_gpg_key_label">
<property name="text"> <property name="text">
@ -275,16 +250,58 @@ anonymous, you can use a fake email.</string>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="0" column="0">
<widget class="QLabel" name="header_label">
<property name="font">
<font>
<family>Tahoma</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>RetroShare uses PGP keys for identity management.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<widget class="QLabel" name="genprofileinfo_label">
<property name="font">
<font>
<family>Tahoma</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>You can install retroshare on different locations using the same identity. For this, just export the selected identity, and import it on the new computer, then create a new location with it.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QFrame" name="headerFrame"> <widget class="HeaderFrame" name="headerFrame">
<property name="maximumSize"> <property name="styleSheet">
<size> <string notr="true"/>
<width>16777215</width>
<height>140</height>
</size>
</property> </property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
@ -292,66 +309,18 @@ anonymous, you can use a fake email.</string>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Plain</enum> <enum>QFrame::Plain</enum>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="topMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<widget class="QLabel" name="headerImage">
<property name="minimumSize">
<size>
<width>128</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>128</width>
<height>128</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="images.qrc">:/images/contact_new128.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="headerLayout">
<item>
<widget class="QLabel" name="headerLabel">
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="text">
<string>Create a new Identity</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="headerLabel2">
<property name="text">
<string>RetroShare uses PGP keys for identity management.</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>HeaderFrame</class>
<extends>QFrame</extends>
<header>gui/common/HeaderFrame.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops> <tabstops>
<tabstop>genPGPuser</tabstop> <tabstop>genPGPuser</tabstop>
<tabstop>name_input</tabstop> <tabstop>name_input</tabstop>

View file

@ -20,8 +20,12 @@ HeaderFrame > QFrame#frame > QLabel#headerLabel {
/* GenCertDialog */ /* GenCertDialog */
GenCertDialog > QFrame#headerFrame { GenCertDialog QLabel#genprofileinfo_label, QLabel#header_label
background-image: url(:/images/genbackground.png); {
border: 1px solid #DCDC41;
border-radius: 6px;
background: #FFFFD7;
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFD7, stop:1 #FFFFB2);
} }
GenCertDialog > QFrame#headerFrame > QLabel#headerLabel { GenCertDialog > QFrame#headerFrame > QLabel#headerLabel {