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

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

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

revision 2341 by capela, Sun Apr 8 19:40:42 2012 UTC revision 2415 by capela, Thu Feb 14 14:57:43 2013 UTC
# Line 1  Line 1 
1  // qsampler.cpp  // qsampler.cpp
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2010, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2013, rncbc aka Rui Nuno Capela. All rights reserved.
5     Copyright (C) 2007, 2008 Christian Schoenebeck     Copyright (C) 2007, 2008 Christian Schoenebeck
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
# Line 376  int main ( int argc, char **argv ) Line 376  int main ( int argc, char **argv )
376          // Dark themes grayed/disabled color group fix...          // Dark themes grayed/disabled color group fix...
377          QPalette pal(app.palette());          QPalette pal(app.palette());
378          if (pal.base().color().value() < 0x7f) {          if (pal.base().color().value() < 0x7f) {
379            #if QT_VERSION >= 0x050000
380                    const QColor& color = pal.window().color();
381                    const int iGroups = int(QPalette::Active | QPalette::Inactive) + 1;
382                    for (int i = 0; i < iGroups; ++i) {
383                            const QPalette::ColorGroup group = QPalette::ColorGroup(i);
384                            pal.setBrush(group, QPalette::Light,    color.lighter(150));
385                            pal.setBrush(group, QPalette::Midlight, color.lighter(120));
386                            pal.setBrush(group, QPalette::Dark,     color.darker(150));
387                            pal.setBrush(group, QPalette::Mid,      color.darker(120));
388                            pal.setBrush(group, QPalette::Shadow,   color.darker(200));
389                    }
390            //      pal.setColor(QPalette::Disabled, QPalette::ButtonText, pal.mid().color());
391            #endif
392                  pal.setColorGroup(QPalette::Disabled,                  pal.setColorGroup(QPalette::Disabled,
393                          pal.windowText().color().darker(),                          pal.windowText().color().darker(),
394                          pal.button(),                          pal.button(),

Legend:
Removed from v.2341  
changed lines
  Added in v.2415

  ViewVC Help
Powered by ViewVC