From 8f94b904dd122ea2b6988fc04781a08637d02f60 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 26 Sep 2013 16:51:11 -0300 Subject: 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 --- qt-gui.cpp | 1 + qt-ui/maintab.cpp | 5 ++++- qt-ui/mainwindow.ui | 38 ++++++++++++++++---------------------- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/qt-gui.cpp b/qt-gui.cpp index cb06bf8d5..59fa1985e 100644 --- a/qt-gui.cpp +++ b/qt-gui.cpp @@ -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"); diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index c10d8737d..18e9b743a 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -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 diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index 05a59524e..72f7444a0 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -26,10 +26,16 @@ - 0 + 1 + + 0 + + + 0 + @@ -37,6 +43,12 @@ + + 0 + + + 0 + @@ -52,16 +64,7 @@ 0 - - 0 - - - 0 - - - 0 - - + 0 @@ -74,16 +77,7 @@ 0 - - 0 - - - 0 - - - 0 - - + 0 @@ -169,7 +163,7 @@ 0 0 763 - 19 + 23 -- cgit v1.2.3-70-g09d2