diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-09-27 12:52:01 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-09-27 09:22:19 -0700 |
commit | e81bbc1dabc3601876bd7393c73b49d5ff87ee85 (patch) | |
tree | b519596d9f81b089b5e4d2829068fba621b9358c /qt-ui/maintab.cpp | |
parent | d6293217993a7601b6e1203cbab1062ba2b2523c (diff) | |
download | subsurface-e81bbc1dabc3601876bd7393c73b49d5ff87ee85.tar.gz |
Hack to make the subsurface work on Gnome3 shell
The Gtk+ style on the Gnome shell is somewhat broken on Qt for
some reason. This hack pokes the system, checks if it's running
gnome-shell, and if the current style is gtk+ ( I couldn't just
check for gtk+ since it worked on XFCE and other Gtk based enviro
ments. so a double check is needed. ) then I changed the Pallete
of the affected widgets by hand.
not a pretty hack but worked.
[Dirk Hohndel: redid the patch to be simpler and more consistent]
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 98247566a..cc56a58c6 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -96,6 +96,17 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), setMinimumHeight(0); setMinimumWidth(0); + + // Current display of things on Gnome3 looks like shit, so + // let`s fix that. + if (isGnome3Session()) { + QPalette p; + p.setColor(QPalette::Window, QColor(Qt::white)); + ui->scrollArea->viewport()->setPalette(p); + ui->scrollArea_2->viewport()->setPalette(p); + ui->scrollArea_3->viewport()->setPalette(p); + ui->scrollArea_4->viewport()->setPalette(p); + } } void MainTab::addDiveStarted() |