* 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,241 +5,233 @@
<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> <widget class="QPushButton" name="chanButton" >
</property> <property name="font" >
<property name="margin" > <font>
<number>0</number> <weight>75</weight>
</property> <bold>true</bold>
<item> </font>
<layout class="QHBoxLayout" >
<property name="leftMargin" >
<number>0</number>
</property> </property>
<property name="topMargin" > <property name="text" >
<number>6</number> <string>Create Channel</string>
</property> </property>
<property name="rightMargin" > <property name="icon" >
<number>0</number> <iconset resource="images.qrc" >:/images/add_channel24.png</iconset>
</property> </property>
<item> <property name="iconSize" >
<widget class="QPushButton" name="chanButton" > <size>
<property name="font" > <width>16</width>
<font> <height>16</height>
<weight>75</weight> </size>
<bold>true</bold> </property>
</font> </widget>
</property>
<property name="text" >
<string>Create Channel</string>
</property>
<property name="icon" >
<iconset resource="images.qrc" >
<normaloff>:/images/add_channel24.png</normaloff>:/images/add_channel24.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>151</width>
<height>28</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="iconLabel" >
<property name="minimumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="pixmap" >
<pixmap resource="images.qrc" >:/images/channels24.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="nameLabel" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Channel Name</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="postButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>26</width>
<height>26</height>
</size>
</property>
<property name="toolTip" >
<string>Post To Channel</string>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="images.qrc" >
<normaloff>:/images/mail_send.png</normaloff>:/images/mail_send.png</iconset>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="subscribeButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>26</width>
<height>26</height>
</size>
</property>
<property name="toolTip" >
<string>Subscribe To Channel</string>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="images.qrc" >
<normaloff>:/images/directoryadd_24x24_shadow.png</normaloff>:/images/directoryadd_24x24_shadow.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="unsubscribeButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>26</width>
<height>26</height>
</size>
</property>
<property name="toolTip" >
<string>Unsubcribe To Channel</string>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="images.qrc" >
<normaloff>:/images/directoryremove_24x24_shadow.png</normaloff>:/images/directoryremove_24x24_shadow.png</iconset>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item row="0" column="1" colspan="2" >
<widget class="QSplitter" name="splitter" > <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<widget class="QFrame" name="chanFrame" > <property name="sizeHint" >
<property name="sizePolicy" > <size>
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" > <width>151</width>
<horstretch>0</horstretch> <height>28</height>
<verstretch>0</verstretch> </size>
</sizepolicy> </property>
</property> </spacer>
<property name="frameShape" > </item>
<enum>QFrame::StyledPanel</enum> <item row="0" column="3" >
</property> <widget class="QLabel" name="iconLabel" >
<property name="frameShadow" > <property name="minimumSize" >
<enum>QFrame::Raised</enum> <size>
</property> <width>24</width>
</widget> <height>24</height>
<widget class="QFrame" name="msgFrame" > </size>
<property name="sizePolicy" > </property>
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" > <property name="text" >
<horstretch>0</horstretch> <string/>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="pixmap" >
</property> <pixmap resource="images.qrc" >:/images/channels24.png</pixmap>
<property name="frameShape" > </property>
<enum>QFrame::StyledPanel</enum> </widget>
</property> </item>
<property name="frameShadow" > <item row="0" column="4" >
<enum>QFrame::Raised</enum> <widget class="QLabel" name="nameLabel" >
</property> <property name="font" >
</widget> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Channel Name</string>
</property>
</widget>
</item>
<item row="0" column="5" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="6" >
<widget class="QPushButton" name="postButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>26</width>
<height>26</height>
</size>
</property>
<property name="toolTip" >
<string>Post To Channel</string>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="images.qrc" >:/images/mail_send.png</iconset>
</property>
</widget>
</item>
<item row="0" column="7" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="8" >
<widget class="QPushButton" name="subscribeButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>26</width>
<height>26</height>
</size>
</property>
<property name="toolTip" >
<string>Subscribe To Channel</string>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="images.qrc" >:/images/directoryadd_24x24_shadow.png</iconset>
</property>
</widget>
</item>
<item row="0" column="9" >
<widget class="QPushButton" name="unsubscribeButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>26</width>
<height>26</height>
</size>
</property>
<property name="toolTip" >
<string>Unsubcribe To Channel</string>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="images.qrc" >:/images/directoryremove_24x24_shadow.png</iconset>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2" >
<widget class="QFrame" name="chanFrame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</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" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item row="1" column="2" colspan="8" >
<widget class="QFrame" name="msgFrame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeIncrement" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>

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,88 +52,96 @@
<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>
<spacer> <property name="verticalSpacing" >
<property name="orientation" > <number>0</number>
<enum>Qt::Horizontal</enum> </property>
</property> <item row="0" column="0" colspan="3" >
<property name="sizeType" > <widget class="QPushButton" name="expandButton" >
<enum>QSizePolicy::Fixed</enum> <property name="sizePolicy" >
</property> <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<property name="sizeHint" > <horstretch>0</horstretch>
<size> <verstretch>0</verstretch>
<width>10</width> </sizepolicy>
<height>20</height> </property>
</size> <property name="maximumSize" >
</property> <size>
</spacer> <width>16777215</width>
</item> <height>14</height>
<item> </size>
<widget class="QPushButton" name="expandButton" > </property>
<property name="sizePolicy" > <property name="toolTip" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" > <string>Expand</string>
<horstretch>0</horstretch> </property>
<verstretch>0</verstretch> <property name="text" >
</sizepolicy> <string/>
</property> </property>
<property name="toolTip" > <property name="icon" >
<string>Expand</string> <iconset/>
</property> </property>
<property name="text" > </widget>
<string/>
</property>
<property name="icon" >
<iconset resource="images.qrc" >:/images/advsearch_24x24.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="titleLabel" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="font" >
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Connected</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>151</width>
<height>26</height>
</size>
</property>
</spacer>
</item>
</layout>
</item> </item>
<item> <item row="1" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<size>
<width>21</width>
<height>28</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1" >
<widget class="QLabel" name="titleLabel" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="font" >
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Connected</string>
</property>
</widget>
</item>
<item row="1" column="2" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>341</width>
<height>28</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" colspan="3" >
<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

@ -42,7 +42,7 @@
<file>images/avatar_background.png</file> <file>images/avatar_background.png</file>
<file>images/backgroundimage.png</file> <file>images/backgroundimage.png</file>
<file>images/button_cancel.png</file> <file>images/button_cancel.png</file>
<file>images/calendar.png</file> <file>images/calendar.png</file>
<file>images/chat.png</file> <file>images/chat.png</file>
<file>images/chat/bar_end.png</file> <file>images/chat/bar_end.png</file>
<file>images/chat/bar_fill.png</file> <file>images/chat/bar_fill.png</file>
@ -99,17 +99,18 @@
<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>
<file>images/filerating0.png</file> <file>images/filerating0.png</file>
<file>images/filerating1.png</file> <file>images/filerating1.png</file>
<file>images/filerating2.png</file> <file>images/filerating2.png</file>
<file>images/filerating3.png</file> <file>images/filerating3.png</file>
<file>images/filerating4.png</file> <file>images/filerating4.png</file>
<file>images/filerating5.png</file> <file>images/filerating5.png</file>
<file>images/fileshare16.png</file> <file>images/fileshare16.png</file>
<file>images/fileshare24.png</file> <file>images/fileshare24.png</file>
<file>images/find.png</file> <file>images/find.png</file>
<file>images/emoticons/kopete/kopete020.png</file> <file>images/emoticons/kopete/kopete020.png</file>
<file>images/flags/af.png</file> <file>images/flags/af.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