Cleanup the prettyness of subsurface on Gtk+ style.

Fix some stuff concerning the pretyness of subsurface while running
on Gnome and XFCE enviroments. This is the kind of stuff that I
really didn`t want to put on the code but sometimes it`s for the
best. this makes the MainTab much more bearable. There are still
things to fix, like the size and positioning of some of the icons.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-09-26 16:51:11 -03:00
parent d6f2988bcf
commit 8f94b904dd
3 changed files with 21 additions and 23 deletions

View file

@ -95,6 +95,7 @@ void init_ui(int *argcp, char ***argvp)
// the Gtk theme makes things unbearably ugly
// so switch to Oxygen in this case
qDebug() << application->style()->objectName();
if (application->style()->objectName() == "gtk+")
application->setStyle("Oxygen");

View file

@ -42,7 +42,10 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
#ifdef __APPLE__
setDocumentMode(false);
#else
setDocumentMode(true);
if (qApp->style()->objectName() == "gtk+")
setDocumentMode(false);
else
setDocumentMode(true);
#endif
// we start out with the fields read-only; once things are
// filled from a dive, they are made writeable

View file

@ -26,10 +26,16 @@
</property>
<widget class="QStackedWidget" name="infoPane">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="page">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="MainTab" name="InfoWidget" native="true"/>
</item>
@ -37,6 +43,12 @@
</widget>
<widget class="QWidget" name="page_2">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="DivePlannerWidget" name="widget" native="true"/>
</item>
@ -52,16 +64,7 @@
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>0</number>
</property>
<item>
@ -74,16 +77,7 @@
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>0</number>
</property>
<item>
@ -169,7 +163,7 @@
<x>0</x>
<y>0</y>
<width>763</width>
<height>19</height>
<height>23</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">