CRASTELLA / texmaker

Automatically exported from code.google.com/p/texmaker
0 stars 0 forks source link

Texmaker and QT5 doesn't allow to choose the style while using Modern interface #1511

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!

When I use the Modern interface, I can't choose the style I want (it always 
uses Fusion), so I want to make it use the GTK+ style and I can't. Fortunately, 
I did a patch to solve that. Please, check it.

http://pastebin.com/cJXpx4ZG

It works fine on my Funtoo with MATE Desktop.

Thanks.

Original issue reported on code.google.com by thirteen...@gmail.com on 21 Jun 2015 at 2:32

GoogleCodeExporter commented 9 years ago
--- a/texmaker.cpp  2014-11-26 09:06:56.000000000 -0300
+++ b/texmaker.cpp  2015-06-19 20:49:58.801377000 -0300
@@ -4451,7 +4451,12 @@
 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
 if (modern_style)
     {
-qApp->setStyle(new ManhattanStyle(QLatin1String("fusion")));
+       if(desktop_env == 1){
+           if (styles.contains("GTK+")) qApp->setStyle(new 
ManhattanStyle(QLatin1String("gtkstyle")));
+           else if (styles.contains("Windows")) qApp->setStyle(new 
ManhattanStyle(QLatin1String("windows")));
+           else qApp->setStyle(new ManhattanStyle(QLatin1String("fusion")));
+       }
+       else qApp->setStyle(new ManhattanStyle(QLatin1String("fusion")));
     }
 // else
 // {

Original comment by ju.lec...@googlemail.com on 21 Jun 2015 at 2:41