fixed to set the text align left for the statusbutton in MessengerWindow

replaced QLineEdit with a editable QComboBox for the status message

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3618 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-10-05 23:18:27 +00:00
parent 3309d2a247
commit 791d6144dc
2 changed files with 26 additions and 38 deletions

View File

@ -1129,13 +1129,13 @@ void MessengerWindow::getAvatar()
/** Loads own personal status message */ /** Loads own personal status message */
void MessengerWindow::loadmystatusmessage() void MessengerWindow::loadmystatusmessage()
{ {
ui.messagelineEdit->setText(QString::fromStdString(rsMsgs->getCustomStateString())); ui.messagelineEdit->setEditText( QString::fromStdString(rsMsgs->getCustomStateString()));
} }
/** Save own status message */ /** Save own status message */
void MessengerWindow::savestatusmessage() void MessengerWindow::savestatusmessage()
{ {
rsMsgs->setCustomStateString(ui.messagelineEdit->text().toStdString()); rsMsgs->setCustomStateString(ui.messagelineEdit->currentText().toStdString());
} }
void MessengerWindow::updateOwnStatus(const QString &peer_id, int status) void MessengerWindow::updateOwnStatus(const QString &peer_id, int status)

View File

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>221</width> <width>258</width>
<height>482</height> <height>482</height>
</rect> </rect>
</property> </property>
@ -86,47 +86,45 @@ stop:0 #05538B, stop:1 #E4F1E5);
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0" colspan="3"> <item row="1" column="0" colspan="2">
<widget class="QPushButton" name="statusButton"> <widget class="QComboBox" name="messagelineEdit">
<property name="sizePolicy"> <property name="editable">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <bool>true</bool>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QPushButton" name="statusButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>0</height> <height>16</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QPushButton:hover { <string notr="true">QPushButton {
text-align: left;
}
QPushButton:hover {
border: 2px solid #8f8f91; border: 2px solid #8f8f91;
border-radius: 6px; border-radius: 6px;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #f6f7fa, stop: 1 #dadbde); stop: 0 #f6f7fa, stop: 1 #dadbde);
min-width: 80px; min-width: 80px;
} }
QPushButton:pressed {
QPushButton:pressed {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #dadbde, stop: 1 #f6f7fa); stop: 0 #dadbde, stop: 1 #f6f7fa);
} }
QPushButton:flat { QPushButton:flat {
border: none; /* no border for a flat push button */ border: none; /* no border for a flat push button */
} }
QPushButton:default { QPushButton:default {
border-color: navy; /* make the default button prominent */ border-color: navy; /* make the default button prominent */
}</string> }</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@ -136,16 +134,6 @@ stop:0 #05538B, stop:1 #E4F1E5);
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="3">
<widget class="QLineEdit" name="messagelineEdit">
<property name="toolTip">
<string>Change your Personal Status here...</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid #CCCCCC;</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
@ -169,7 +157,7 @@ stop:0 #05538B, stop:1 #E4F1E5);
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>38</height> <height>32</height>
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -193,7 +181,7 @@ border-bottom: 1px solid #CCCCCC;
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<property name="margin"> <property name="margin">
<number>6</number> <number>2</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QToolButton" name="addIMAccountButton"> <widget class="QToolButton" name="addIMAccountButton">
@ -444,7 +432,7 @@ border: 1px solid #CCCCCC;
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>221</width> <width>258</width>
<height>20</height> <height>20</height>
</rect> </rect>
</property> </property>