mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
d629321799
commit
e81bbc1dab
5 changed files with 43 additions and 5 deletions
|
@ -8,6 +8,9 @@
|
|||
#include <QSpinBox>
|
||||
#include <QButtonGroup>
|
||||
#include <QDebug>
|
||||
#include <QProcess>
|
||||
#include <QStringList>
|
||||
#include <QDebug>
|
||||
|
||||
#include "../dive.h"
|
||||
|
||||
|
@ -118,3 +121,18 @@ RenumberDialog::RenumberDialog(): QDialog(), ui( new Ui::RenumberDialog())
|
|||
ui->setupUi(this);
|
||||
connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(buttonClicked(QAbstractButton*)));
|
||||
}
|
||||
|
||||
bool isGnome3Session()
|
||||
{
|
||||
#if defined(QT_OS_WIW) || defined(QT_OS_MAC)
|
||||
return false;
|
||||
#else
|
||||
if (qApp->style()->objectName() != "gtk+")
|
||||
return false;
|
||||
QProcess p;
|
||||
p.start("pidof", QStringList() << "gnome-shell" );
|
||||
p.waitForFinished(-1);
|
||||
QString p_stdout = p.readAllStandardOutput();
|
||||
return !p_stdout.isEmpty();
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue