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>
This commit is contained in:
Tomaz Canabrava 2013-09-27 12:52:01 -03:00 committed by Dirk Hohndel
parent d629321799
commit e81bbc1dab
5 changed files with 43 additions and 5 deletions

View file

@ -93,11 +93,6 @@ void init_ui(int *argcp, char ***argvp)
// note: on Linux, "system" == "environment variables"
QNetworkProxyFactory::setUseSystemConfiguration(true);
// the Gtk theme makes things unbearably ugly
// so switch to Oxygen in this case
if (application->style()->objectName() == "gtk+")
application->setStyle("Oxygen");
#if QT_VERSION < 0x050000
// ask QString in Qt 4 to interpret all char* as UTF-8,
// like Qt 5 does.