/[svn]/qsampler/trunk/src/main.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/main.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1749 by capela, Wed Jul 2 13:19:09 2008 UTC revision 1788 by capela, Sun Oct 26 15:44:42 2008 UTC
# Line 32  Line 32 
32  #include <QDir>  #include <QDir>
33  #endif  #endif
34    
35  #if defined(Q_WS_X11)  #if QT_VERSION < 0x040300
36    #define lighter(x)      light(x)
37    #define darker(x)       dark(x)
38    #endif
39    
40    
41  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
42  // Single application instance stuff (Qt/X11 only atm.)  // Singleton application instance stuff (Qt/X11 only atm.)
43  //  //
44    
45    #if defined(Q_WS_X11)
46    
47  #include <QX11Info>  #include <QX11Info>
48    
49  #include <X11/Xatom.h>  #include <X11/Xatom.h>
# Line 267  int main ( int argc, char **argv ) Line 273  int main ( int argc, char **argv )
273                  return 2;                  return 2;
274          }          }
275    
276            // Dark themes grayed/disabled color group fix...
277            QPalette pal(app.palette());
278            if (pal.base().color().value() < 0x7f) {
279                    pal.setColorGroup(QPalette::Disabled,
280                            pal.windowText().color().darker(),
281                            pal.button(),
282                            pal.light(),
283                            pal.dark(),
284                            pal.mid(),
285                            pal.text().color().darker(),
286                            pal.text().color().lighter(),
287                            pal.base(),
288                            pal.window());
289                    app.setPalette(pal);
290            }
291    
292          // Set default base font...          // Set default base font...
293            int iBaseFontSize = app.font().pointSize();
294          if (options.iBaseFontSize > 0)          if (options.iBaseFontSize > 0)
295                  app.setFont(QFont(app.font().family(), options.iBaseFontSize));                  iBaseFontSize = options.iBaseFontSize;
296            app.setFont(QFont(app.font().family(), iBaseFontSize));
297    
298          // Construct, setup and show the main form.          // Construct, setup and show the main form.
299          QSampler::MainForm w;          QSampler::MainForm w;

Legend:
Removed from v.1749  
changed lines
  Added in v.1788

  ViewVC Help
Powered by ViewVC