* 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>
<x>0</x>
<y>0</y>
<width>607</width>
<height>429</height>
<width>637</width>
<height>470</height>
</rect>
</property>
<property name="windowTitle" >
<string>Form</string>
</property>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>0</number>
</property>
<property name="margin" >
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="leftMargin" >
<number>0</number>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QPushButton" name="chanButton" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="topMargin" >
<number>6</number>
<property name="text" >
<string>Create Channel</string>
</property>
<property name="rightMargin" >
<number>0</number>
<property name="icon" >
<iconset resource="images.qrc" >:/images/add_channel24.png</iconset>
</property>
<item>
<widget class="QPushButton" name="chanButton" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</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>
<property name="iconSize" >
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QSplitter" name="splitter" >
<item row="0" column="1" colspan="2" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<widget class="QFrame" name="chanFrame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
</widget>
<widget class="QFrame" name="msgFrame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
</widget>
<property name="sizeHint" >
<size>
<width>151</width>
<height>28</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="3" >
<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 row="0" column="4" >
<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 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>
</item>
</layout>

View File

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

View File

@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>483</width>
<height>262</height>
<width>290</width>
<height>226</height>
</rect>
</property>
<property name="windowTitle" >
@ -39,7 +39,7 @@
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
@ -52,88 +52,96 @@
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" >
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<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" >
<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>
<property name="horizontalSpacing" >
<number>0</number>
</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>
<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" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
@ -165,7 +173,7 @@
<string/>
</property>
<property name="pixmap" >
<pixmap resource="images.qrc" >:/images/contacts24.png</pixmap>
<pixmap/>
</property>
</widget>
</item>
@ -203,7 +211,7 @@
</layout>
</widget>
<resources>
<include location="images.qrc" />
<include location="../images.qrc" />
</resources>
<connections/>
</ui>

View File

@ -42,7 +42,7 @@
<file>images/avatar_background.png</file>
<file>images/backgroundimage.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/bar_end.png</file>
<file>images/chat/bar_fill.png</file>
@ -99,17 +99,18 @@
<file>images/evolution.png</file>
<file>images/exit_24x24.png</file>
<file>images/expand_hover.png</file>
<file>images/expand_frame.png</file>
<file>images/exportpeers_16x16.png</file>
<file>images/filefind.png</file>
<file>images/fileinfo.png</file>
<file>images/filerating0.png</file>
<file>images/filerating1.png</file>
<file>images/filerating2.png</file>
<file>images/filerating3.png</file>
<file>images/filerating4.png</file>
<file>images/filerating0.png</file>
<file>images/filerating1.png</file>
<file>images/filerating2.png</file>
<file>images/filerating3.png</file>
<file>images/filerating4.png</file>
<file>images/filerating5.png</file>
<file>images/fileshare16.png</file>
<file>images/fileshare24.png</file>
<file>images/fileshare24.png</file>
<file>images/find.png</file>
<file>images/emoticons/kopete/kopete020.png</file>
<file>images/flags/af.png</file>
@ -156,6 +157,7 @@
<file>images/help.png</file>
<file>images/help24.png</file>
<file>images/hide_toolbox_frame.png</file>
<file>images/hide_frame.png</file>
<file>images/highlight.png</file>
<file>images/hi16-app-ktorrent.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