1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Redesign draft for settings pane and proper UX for Mac

This commit is contained in:
Ilya Kowalewski 2015-05-11 00:40:08 +03:00
parent 9d84462c65
commit 6c8b130a25
10 changed files with 321 additions and 202 deletions

View File

@ -437,7 +437,8 @@ SOURCES += \
src/widget/tool/screengrabberchooserrectitem.cpp \ src/widget/tool/screengrabberchooserrectitem.cpp \
src/widget/tool/screengrabberoverlayitem.cpp \ src/widget/tool/screengrabberoverlayitem.cpp \
src/widget/tool/toolboxgraphicsitem.cpp \ src/widget/tool/toolboxgraphicsitem.cpp \
src/widget/tool/flyoutoverlaywidget.cpp src/widget/tool/flyoutoverlaywidget.cpp \
src/widget/form/settings/verticalonlyscroller.cpp
HEADERS += \ HEADERS += \
@ -468,4 +469,5 @@ HEADERS += \
src/widget/tool/screengrabberchooserrectitem.h \ src/widget/tool/screengrabberchooserrectitem.h \
src/widget/tool/screengrabberoverlayitem.h \ src/widget/tool/screengrabberoverlayitem.h \
src/widget/tool/toolboxgraphicsitem.h \ src/widget/tool/toolboxgraphicsitem.h \
src/widget/tool/flyoutoverlaywidget.h src/widget/tool/flyoutoverlaywidget.h \
src/widget/form/settings/verticalonlyscroller.h

View File

@ -144,7 +144,7 @@ int main(int argc, char *argv[])
cvSetErrMode(CV_ErrModeParent); cvSetErrMode(CV_ErrModeParent);
cvRedirectError(opencvErrorHandler); cvRedirectError(opencvErrorHandler);
#ifdef Q_OS_MACX #if defined(Q_OS_MACX) && defined(QT_RELEASE)
if (qApp->applicationDirPath() != "/Applications/qtox.app/Contents/MacOS") { if (qApp->applicationDirPath() != "/Applications/qtox.app/Contents/MacOS") {
qDebug() << "OS X: Not in Applications folder"; qDebug() << "OS X: Not in Applications folder";

View File

@ -15,7 +15,7 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QScrollArea" name="scrollArea"> <widget class="VerticalOnlyScroller" name="scrollArea">
<property name="widgetResizable"> <property name="widgetResizable">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -24,8 +24,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>380</width> <width>374</width>
<height>280</height> <height>302</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
@ -114,6 +114,14 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>VerticalOnlyScroller</class>
<extends>QScrollArea</extends>
<header>src/widget/form/settings/verticalonlyscroller.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

View File

@ -15,7 +15,7 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<widget class="QScrollArea" name="scrollArea"> <widget class="VerticalOnlyScroller" name="scrollArea">
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -30,8 +30,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>824</width> <width>818</width>
<height>489</height> <height>510</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout_5">
@ -242,6 +242,14 @@ which may lead to problems with video calls.</string>
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>VerticalOnlyScroller</class>
<extends>QScrollArea</extends>
<header>src/widget/form/settings/verticalonlyscroller.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>573</width> <width>673</width>
<height>644</height> <height>1100</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -27,7 +27,7 @@
<number>9</number> <number>9</number>
</property> </property>
<item> <item>
<widget class="QScrollArea" name="scrollArea"> <widget class="VerticalOnlyScroller" name="scrollArea">
<property name="widgetResizable"> <property name="widgetResizable">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -38,14 +38,14 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>-214</y> <y>0</y>
<width>539</width> <width>653</width>
<height>838</height> <height>1080</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,0,1"> <layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,0,1">
<property name="spacing"> <property name="spacing">
<number>9</number> <number>32</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>9</number> <number>9</number>
@ -104,76 +104,80 @@
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item row="0" column="0"> <item>
<widget class="QCheckBox" name="showSystemTray"> <layout class="QVBoxLayout" name="verticalLayout_6">
<property name="text"> <item>
<string>Show system tray icon</string> <widget class="QCheckBox" name="startInTray">
</property> <property name="sizePolicy">
</widget> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
</item> <horstretch>0</horstretch>
<item row="0" column="1"> <verstretch>0</verstretch>
<widget class="QCheckBox" name="lightTrayIcon"> </sizepolicy>
<property name="toolTip"> </property>
<string comment="toolTip for light icon setting">Enable light tray icon.</string> <property name="toolTip">
</property> <string comment="toolTip for Start in tray setting">qTox will start minimized in tray.</string>
<property name="text"> </property>
<string>Light icon</string> <property name="text">
</property> <string>Start in tray</string>
</widget> </property>
</item> </widget>
<item row="2" column="0"> </item>
<widget class="QCheckBox" name="startInTray"> <item>
<property name="sizePolicy"> <widget class="QCheckBox" name="showSystemTray">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <property name="text">
<horstretch>0</horstretch> <string>Show system tray icon</string>
<verstretch>0</verstretch> </property>
</sizepolicy> </widget>
</property> </item>
<property name="toolTip"> <item>
<string comment="toolTip for Start in tray setting">qTox will start minimized in tray.</string> <widget class="QCheckBox" name="closeToTray">
</property> <property name="sizePolicy">
<property name="text"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<string>Start in tray</string> <horstretch>0</horstretch>
</property> <verstretch>0</verstretch>
</widget> </sizepolicy>
</item> </property>
<item row="2" column="1"> <property name="toolTip">
<widget class="QCheckBox" name="closeToTray"> <string comment="toolTip for close to tray setting">After pressing close (X) qTox will minimize to tray,
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string comment="toolTip for close to tray setting">After pressing close (X) qTox will minimize to tray,
instead of closing itself.</string> instead of closing itself.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Close to tray</string> <string>Close to tray</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="2"> <item>
<widget class="QCheckBox" name="minimizeToTray"> <widget class="QCheckBox" name="lightTrayIcon">
<property name="sizePolicy"> <property name="toolTip">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <string comment="toolTip for light icon setting">Enable light tray icon.</string>
<horstretch>0</horstretch> </property>
<verstretch>0</verstretch> <property name="text">
</sizepolicy> <string>Light icon</string>
</property> </property>
<property name="toolTip"> </widget>
<string comment="toolTip for minimize to tray setting">After pressing minimize (_) qTox will minimize itself to tray, </item>
<item>
<widget class="QCheckBox" name="minimizeToTray">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string comment="toolTip for minimize to tray setting">After pressing minimize (_) qTox will minimize itself to tray,
instead of system taskbar.</string> instead of system taskbar.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Minimize to tray</string> <string>Minimize to tray</string>
</property> </property>
</widget> </widget>
</item>
</layout>
</item> </item>
<item row="2" column="3"> <item>
<spacer name="traySpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -189,23 +193,40 @@ instead of system taskbar.</string>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<item> <item>
<widget class="QCheckBox" name="cbAutorun"> <layout class="QVBoxLayout" name="verticalLayout_8">
<property name="toolTip"> <item>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Start qTox on operating system startup (current profile).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <widget class="QCheckBox" name="cbAutorun">
</property> <property name="toolTip">
<property name="text"> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Start qTox on operating system startup (current profile).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Autostart</string> </property>
</property> <property name="text">
</widget> <string>Autostart</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkUpdates">
<property name="text">
<string>Check for updates on startup</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkUpdates"> <spacer name="horizontalSpacer_3">
<property name="text"> <property name="orientation">
<string>Check for updates on startup</string> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item> </item>
</layout> </layout>
</item> </item>
@ -214,40 +235,20 @@ instead of system taskbar.</string>
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
</property> </property>
<item row="1" column="1"> <item row="0" column="0" colspan="2">
<widget class="QLabel" name="autoSaveFilesDirLabel"> <widget class="QLabel" name="autoAwayLabel">
<property name="toolTip"> <property name="toolTip">
<string>Set where files will be saved.</string> <string>Your status is changed to Away after set period of inactivity.</string>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property> </property>
<property name="text"> <property name="text">
<string>Save to:</string> <string>Auto away after (0 to disable):</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="0" column="1">
<widget class="QCheckBox" name="autoacceptFiles">
<property name="toolTip">
<string comment="autoaccept cb tooltip">You can set this on a per-friend basis by right clicking them.</string>
</property>
<property name="text">
<string>Autoaccept files</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="autoSaveFilesDir">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Set where files will be saved.</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QSpinBox" name="autoAwaySpinBox"> <widget class="QSpinBox" name="autoAwaySpinBox">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -272,16 +273,26 @@ instead of system taskbar.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" colspan="2"> <item row="1" column="0">
<widget class="QLabel" name="autoAwayLabel"> <widget class="QCheckBox" name="autoacceptFiles">
<property name="toolTip"> <property name="toolTip">
<string>Your status is changed to Away after set period of inactivity.</string> <string comment="autoaccept cb tooltip">You can set this on a per-friend basis by right clicking them.</string>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property> </property>
<property name="text"> <property name="text">
<string>Auto away after (0 to disable):</string> <string>Autoaccept and save files:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="autoSaveFilesDir">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Set where files will be saved.</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -295,36 +306,32 @@ instead of system taskbar.</string>
<property name="title"> <property name="title">
<string>Chat</string> <string>Chat</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0"> <layout class="QVBoxLayout" name="verticalLayout_7">
<item row="3" column="0"> <item>
<widget class="QCheckBox" name="groupAlwaysNotify">
<property name="toolTip">
<string comment="toolTip for Group chat always notify">Always notify about new messages in groupchats.</string>
</property>
<property name="text">
<string>Group chats always notify</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="statusChanges">
<property name="text">
<string>Show contacts' status changes</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>On new message:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="onMessageLayout"> <layout class="QHBoxLayout" name="onMessageLayout">
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
</property> </property>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>On new message:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QCheckBox" name="showWindow"> <widget class="QCheckBox" name="showWindow">
<property name="toolTip"> <property name="toolTip">
@ -357,20 +364,34 @@ instead of system taskbar.</string>
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="2"> <item>
<spacer name="chatSpacer"> <widget class="QCheckBox" name="statusChanges">
<property name="orientation"> <property name="text">
<enum>Qt::Horizontal</enum> <string>Show contacts' status changes</string>
</property> </property>
<property name="sizeHint" stdset="0"> </widget>
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item> </item>
<item row="2" column="1"> <item>
<widget class="QCheckBox" name="groupAlwaysNotify">
<property name="toolTip">
<string comment="toolTip for Group chat always notify">Always notify about new messages in groupchats.</string>
</property>
<property name="text">
<string>Group chats always notify</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbGroupchatPosition">
<property name="toolTip">
<string comment="toolTip for groupchat positioning">If checked, groupchats will be placed at the top of the friends list, otherwise, they'll be placed below online friends.</string>
</property>
<property name="text">
<string>Place groupchats at top of friend list</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbFauxOfflineMessaging"> <widget class="QCheckBox" name="cbFauxOfflineMessaging">
<property name="toolTip"> <property name="toolTip">
<string comment="toolTip for Faux offline messaging setting">Messages you are trying to send to your friends when they are not online <string comment="toolTip for Faux offline messaging setting">Messages you are trying to send to your friends when they are not online
@ -381,7 +402,7 @@ will be sent to them when they appear online to you.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item>
<widget class="QCheckBox" name="cbCompactLayout"> <widget class="QCheckBox" name="cbCompactLayout">
<property name="toolTip"> <property name="toolTip">
<string comment="toolTip for compact layout setting">Your contact list will be shown in compact mode.</string> <string comment="toolTip for compact layout setting">Your contact list will be shown in compact mode.</string>
@ -391,16 +412,6 @@ will be sent to them when they appear online to you.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0">
<widget class="QCheckBox" name="cbGroupchatPosition">
<property name="toolTip">
<string comment="toolTip for groupchat positioning">If checked, groupchats will be placed at the top of the friends list, otherwise, they'll be placed below online friends.</string>
</property>
<property name="text">
<string>Place groupchats at top of friend list</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -710,11 +721,28 @@ will be sent to them when they appear online to you.</string>
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QPushButton" name="reconnectButton"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="text"> <item>
<string comment="reconnect button">Reconnect</string> <spacer name="horizontalSpacer_4">
</property> <property name="orientation">
</widget> <enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="reconnectButton">
<property name="text">
<string comment="reconnect button">Reconnect</string>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -725,16 +753,17 @@ will be sent to them when they appear online to you.</string>
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>VerticalOnlyScroller</class>
<extends>QScrollArea</extends>
<header>src/widget/form/settings/verticalonlyscroller.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops> <tabstops>
<tabstop>scrollArea</tabstop> <tabstop>scrollArea</tabstop>
<tabstop>transComboBox</tabstop> <tabstop>transComboBox</tabstop>
<tabstop>showSystemTray</tabstop>
<tabstop>lightTrayIcon</tabstop>
<tabstop>startInTray</tabstop>
<tabstop>closeToTray</tabstop>
<tabstop>minimizeToTray</tabstop>
<tabstop>cbAutorun</tabstop>
<tabstop>checkUpdates</tabstop>
<tabstop>autoacceptFiles</tabstop> <tabstop>autoacceptFiles</tabstop>
<tabstop>autoSaveFilesDir</tabstop> <tabstop>autoSaveFilesDir</tabstop>
<tabstop>autoAwaySpinBox</tabstop> <tabstop>autoAwaySpinBox</tabstop>
@ -742,8 +771,6 @@ will be sent to them when they appear online to you.</string>
<tabstop>statusChanges</tabstop> <tabstop>statusChanges</tabstop>
<tabstop>showWindow</tabstop> <tabstop>showWindow</tabstop>
<tabstop>showInFront</tabstop> <tabstop>showInFront</tabstop>
<tabstop>cbFauxOfflineMessaging</tabstop>
<tabstop>cbCompactLayout</tabstop>
<tabstop>useEmoticons</tabstop> <tabstop>useEmoticons</tabstop>
<tabstop>smileyPackBrowser</tabstop> <tabstop>smileyPackBrowser</tabstop>
<tabstop>emoticonSize</tabstop> <tabstop>emoticonSize</tabstop>
@ -755,7 +782,6 @@ will be sent to them when they appear online to you.</string>
<tabstop>proxyType</tabstop> <tabstop>proxyType</tabstop>
<tabstop>proxyAddr</tabstop> <tabstop>proxyAddr</tabstop>
<tabstop>proxyPort</tabstop> <tabstop>proxyPort</tabstop>
<tabstop>reconnectButton</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>
<connections> <connections>

View File

@ -27,7 +27,7 @@
<number>9</number> <number>9</number>
</property> </property>
<item> <item>
<widget class="QScrollArea" name="scrollArea"> <widget class="VerticalOnlyScroller" name="scrollArea">
<property name="widgetResizable"> <property name="widgetResizable">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -37,7 +37,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>380</width> <width>380</width>
<height>280</height> <height>391</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
@ -131,15 +131,15 @@ Save format changes are possible, which may result in data loss.</string>
</item> </item>
<item alignment="Qt::AlignTop"> <item alignment="Qt::AlignTop">
<widget class="QGroupBox" name="nospamGroup"> <widget class="QGroupBox" name="nospamGroup">
<property name="title">
<string>Nospam</string>
</property>
<property name="toolTip"> <property name="toolTip">
<string comment="toolTip for nospam">Nospam is part of your Tox ID. <string comment="toolTip for nospam">Nospam is part of your Tox ID.
It is there to help you change your Tox ID when you feel like you are getting too much spam friend requests. It is there to help you change your Tox ID when you feel like you are getting too much spam friend requests.
When you change nospam, your current contacts still can communicate with you, When you change nospam, your current contacts still can communicate with you,
but new contacts need to know your new Tox ID to be able to add you.</string> but new contacts need to know your new Tox ID to be able to add you.</string>
</property> </property>
<property name="title">
<string>Nospam</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_4">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
@ -181,6 +181,14 @@ but new contacts need to know your new Tox ID to be able to add you.</string>
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>VerticalOnlyScroller</class>
<extends>QScrollArea</extends>
<header>src/widget/form/settings/verticalonlyscroller.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

View File

@ -0,0 +1,31 @@
/*
Copyright (C) 2014 by Project Tox <https://tox.im>
This file is part of qTox, a Qt-based graphical interface for Tox.
This program is libre software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the COPYING file for more details.
*/
#include <QResizeEvent>
#include "verticalonlyscroller.h"
VerticalOnlyScroller::VerticalOnlyScroller(QWidget *parent) :
QScrollArea(parent)
{
}
void VerticalOnlyScroller::resizeEvent(QResizeEvent *event)
{
QScrollArea::resizeEvent(event);
if (widget())
widget()->setMaximumWidth(event->size().width());
}

View File

@ -0,0 +1,34 @@
/*
Copyright (C) 2014 by Project Tox <https://tox.im>
This file is part of qTox, a Qt-based graphical interface for Tox.
This program is libre software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the COPYING file for more details.
*/
#ifndef VERTICALONLYSCROLLER_H
#define VERTICALONLYSCROLLER_H
#include <QScrollArea>
class QResizeEvent;
class VerticalOnlyScroller : public QScrollArea
{
Q_OBJECT
public:
explicit VerticalOnlyScroller(QWidget *parent = 0);
protected:
void resizeEvent(QResizeEvent *event);
};
#endif // VERTICALONLYSCROLLER_H

View File

@ -46,7 +46,7 @@ SettingsWidget::SettingsWidget(QWidget* parent)
headLayout->addStretch(1); headLayout->addStretch(1);
settingsWidgets = new QTabWidget(this); settingsWidgets = new QTabWidget(this);
settingsWidgets->setTabPosition(QTabWidget::South); settingsWidgets->setTabPosition(QTabWidget::North);
bodyLayout->addWidget(settingsWidgets); bodyLayout->addWidget(settingsWidgets);

View File

@ -148,10 +148,12 @@ void Widget::init()
ui->mainContent->setStyle(QStyleFactory::create(Settings::getInstance().getStyle())); ui->mainContent->setStyle(QStyleFactory::create(Settings::getInstance().getStyle()));
} }
#ifndef Q_OS_MAC
ui->mainHead->setStyleSheet(Style::getStylesheet(":ui/settings/mainHead.css")); ui->mainHead->setStyleSheet(Style::getStylesheet(":ui/settings/mainHead.css"));
ui->mainContent->setStyleSheet(Style::getStylesheet(":ui/settings/mainContent.css")); ui->mainContent->setStyleSheet(Style::getStylesheet(":ui/settings/mainContent.css"));
ui->statusHead->setStyleSheet(Style::getStylesheet(":/ui/window/statusPanel.css")); ui->statusHead->setStyleSheet(Style::getStylesheet(":/ui/window/statusPanel.css"));
ui->statusPanel->setStyleSheet(Style::getStylesheet(":/ui/window/statusPanel.css"));
#endif
contactListWidget = new FriendListWidget(0, Settings::getInstance().getGroupchatPosition()); contactListWidget = new FriendListWidget(0, Settings::getInstance().getGroupchatPosition());
ui->friendList->setWidget(contactListWidget); ui->friendList->setWidget(contactListWidget);