* redesign Channel Menu Item, more userfriendly

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@808 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2008-11-15 23:42:47 +00:00
parent de8df4d55b
commit 30338246f2
6 changed files with 325 additions and 316 deletions

View file

@ -5,32 +5,15 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>607</width> <width>637</width>
<height>429</height> <height>470</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle" >
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QGridLayout" >
<property name="spacing" > <item row="0" column="0" >
<number>0</number>
</property>
<property name="margin" >
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>6</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="chanButton" > <widget class="QPushButton" name="chanButton" >
<property name="font" > <property name="font" >
<font> <font>
@ -42,8 +25,7 @@
<string>Create Channel</string> <string>Create Channel</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="images.qrc" > <iconset resource="images.qrc" >:/images/add_channel24.png</iconset>
<normaloff>:/images/add_channel24.png</normaloff>:/images/add_channel24.png</iconset>
</property> </property>
<property name="iconSize" > <property name="iconSize" >
<size> <size>
@ -53,12 +35,12 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="1" colspan="2" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" >
<size> <size>
<width>151</width> <width>151</width>
<height>28</height> <height>28</height>
@ -66,7 +48,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item row="0" column="3" >
<widget class="QLabel" name="iconLabel" > <widget class="QLabel" name="iconLabel" >
<property name="minimumSize" > <property name="minimumSize" >
<size> <size>
@ -82,7 +64,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="4" >
<widget class="QLabel" name="nameLabel" > <widget class="QLabel" name="nameLabel" >
<property name="font" > <property name="font" >
<font> <font>
@ -95,7 +77,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="5" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -103,7 +85,7 @@
<property name="sizeType" > <property name="sizeType" >
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" >
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -111,7 +93,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item row="0" column="6" >
<widget class="QPushButton" name="postButton" > <widget class="QPushButton" name="postButton" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" > <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
@ -132,12 +114,11 @@
<string/> <string/>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="images.qrc" > <iconset resource="images.qrc" >:/images/mail_send.png</iconset>
<normaloff>:/images/mail_send.png</normaloff>:/images/mail_send.png</iconset>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="7" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -145,7 +126,7 @@
<property name="sizeType" > <property name="sizeType" >
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" >
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -153,7 +134,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item row="0" column="8" >
<widget class="QPushButton" name="subscribeButton" > <widget class="QPushButton" name="subscribeButton" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" > <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
@ -174,12 +155,11 @@
<string/> <string/>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="images.qrc" > <iconset resource="images.qrc" >:/images/directoryadd_24x24_shadow.png</iconset>
<normaloff>:/images/directoryadd_24x24_shadow.png</normaloff>:/images/directoryadd_24x24_shadow.png</iconset>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="9" >
<widget class="QPushButton" name="unsubscribeButton" > <widget class="QPushButton" name="unsubscribeButton" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" > <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
@ -200,18 +180,11 @@
<string/> <string/>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="images.qrc" > <iconset resource="images.qrc" >:/images/directoryremove_24x24_shadow.png</iconset>
<normaloff>:/images/directoryremove_24x24_shadow.png</normaloff>:/images/directoryremove_24x24_shadow.png</iconset>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item row="1" column="0" colspan="2" >
</item>
<item>
<widget class="QSplitter" name="splitter" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<widget class="QFrame" name="chanFrame" > <widget class="QFrame" name="chanFrame" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" > <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
@ -219,6 +192,18 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="maximumSize" >
<size>
<width>240</width>
<height>16777215</height>
</size>
</property>
<property name="sizeIncrement" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="frameShape" > <property name="frameShape" >
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
@ -226,6 +211,8 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
</widget> </widget>
</item>
<item row="1" column="2" colspan="8" >
<widget class="QFrame" name="msgFrame" > <widget class="QFrame" name="msgFrame" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" > <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
@ -233,6 +220,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="sizeIncrement" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="frameShape" > <property name="frameShape" >
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
@ -240,7 +233,6 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
</widget> </widget>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>

View file

@ -42,6 +42,8 @@ ChanMenuItem::ChanMenuItem(std::string chanId)
small(); small();
updateItemStatic(); updateItemStatic();
updateItem(); updateItem();
expandButton->setIcon(QIcon(QString(":/images/hide_frame.png")));
} }
@ -88,10 +90,15 @@ void ChanMenuItem::toggle()
if (expandFrame->isHidden()) if (expandFrame->isHidden())
{ {
expandFrame->show(); expandFrame->show();
expandButton->setIcon(QIcon(QString(":/images/expand_frame.png")));
expandButton->setToolTip("Hide");
} }
else else
{ {
expandFrame->hide(); expandFrame->hide();
expandButton->setIcon(QIcon(QString(":/images/hide_frame.png")));
expandButton->setToolTip("Expand");
} }
} }

View file

@ -5,8 +5,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>483</width> <width>290</width>
<height>262</height> <height>226</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle" >
@ -39,7 +39,7 @@
<property name="frameShadow" > <property name="frameShadow" >
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QGridLayout" >
<property name="leftMargin" > <property name="leftMargin" >
<number>0</number> <number>0</number>
</property> </property>
@ -52,9 +52,38 @@
<property name="bottomMargin" > <property name="bottomMargin" >
<number>0</number> <number>0</number>
</property> </property>
<item> <property name="horizontalSpacing" >
<layout class="QHBoxLayout" > <number>0</number>
<item> </property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="0" colspan="3" >
<widget class="QPushButton" name="expandButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize" >
<size>
<width>16777215</width>
<height>14</height>
</size>
</property>
<property name="toolTip" >
<string>Expand</string>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset/>
</property>
</widget>
</item>
<item row="1" column="0" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -64,32 +93,13 @@
</property> </property>
<property name="sizeHint" > <property name="sizeHint" >
<size> <size>
<width>10</width> <width>21</width>
<height>20</height> <height>28</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item row="1" column="1" >
<widget class="QPushButton" name="expandButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip" >
<string>Expand</string>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="images.qrc" >:/images/advsearch_24x24.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="titleLabel" > <widget class="QLabel" name="titleLabel" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" > <sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
@ -115,7 +125,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="2" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -125,15 +135,13 @@
</property> </property>
<property name="sizeHint" > <property name="sizeHint" >
<size> <size>
<width>151</width> <width>341</width>
<height>26</height> <height>28</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout> <item row="2" column="0" colspan="3" >
</item>
<item>
<widget class="QFrame" name="expandFrame" > <widget class="QFrame" name="expandFrame" >
<property name="frameShape" > <property name="frameShape" >
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
@ -165,7 +173,7 @@
<string/> <string/>
</property> </property>
<property name="pixmap" > <property name="pixmap" >
<pixmap resource="images.qrc" >:/images/contacts24.png</pixmap> <pixmap/>
</property> </property>
</widget> </widget>
</item> </item>
@ -203,7 +211,7 @@
</layout> </layout>
</widget> </widget>
<resources> <resources>
<include location="images.qrc" /> <include location="../images.qrc" />
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View file

@ -99,6 +99,7 @@
<file>images/evolution.png</file> <file>images/evolution.png</file>
<file>images/exit_24x24.png</file> <file>images/exit_24x24.png</file>
<file>images/expand_hover.png</file> <file>images/expand_hover.png</file>
<file>images/expand_frame.png</file>
<file>images/exportpeers_16x16.png</file> <file>images/exportpeers_16x16.png</file>
<file>images/filefind.png</file> <file>images/filefind.png</file>
<file>images/fileinfo.png</file> <file>images/fileinfo.png</file>
@ -156,6 +157,7 @@
<file>images/help.png</file> <file>images/help.png</file>
<file>images/help24.png</file> <file>images/help24.png</file>
<file>images/hide_toolbox_frame.png</file> <file>images/hide_toolbox_frame.png</file>
<file>images/hide_frame.png</file>
<file>images/highlight.png</file> <file>images/highlight.png</file>
<file>images/hi16-app-ktorrent.png</file> <file>images/hi16-app-ktorrent.png</file>
<file>images/image16.png</file> <file>images/image16.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B