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

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

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

revision 3759 by capela, Tue Dec 10 10:34:06 2019 UTC revision 3760 by capela, Mon Mar 30 16:38:22 2020 UTC
# Line 1  Line 1 
1  // qsamplerPaletteForm.cpp  // qsamplerPaletteForm.cpp
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2019, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2020, rncbc aka Rui Nuno Capela. All rights reserved.
5     Copyright (C) 2007, Christian Schoenebeck     Copyright (C) 2007, 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 78  static struct Line 78  static struct
78          { "LinkVisited",     QPalette::LinkVisited     },          { "LinkVisited",     QPalette::LinkVisited     },
79          { "ToolTipBase",     QPalette::ToolTipBase     },          { "ToolTipBase",     QPalette::ToolTipBase     },
80          { "ToolTipText",     QPalette::ToolTipText     },          { "ToolTipText",     QPalette::ToolTipText     },
81    #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
82            { "PlaceholderText", QPalette::PlaceholderText },
83    #endif
84          { "NoRole",          QPalette::NoRole          },          { "NoRole",          QPalette::NoRole          },
85    
86          {  nullptr,          QPalette::NoRole          }          {  nullptr,          QPalette::NoRole          }
# Line 516  bool PaletteForm::namedPalette ( Line 519  bool PaletteForm::namedPalette (
519          QSettings *settings, const QString& name, QPalette& pal, bool fixup )          QSettings *settings, const QString& name, QPalette& pal, bool fixup )
520  {  {
521          int result = 0;          int result = 0;
522    #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
523          uint mask = pal.resolve();          uint mask = pal.resolve();
524    #endif
525    
526          // Custom color themes...          // Custom color themes...
527          if (name == "Wonton Soup") {          if (name == "Wonton Soup") {
# Line 577  bool PaletteForm::namedPalette ( Line 582  bool PaletteForm::namedPalette (
582                  pal.setColor(QPalette::Active,   QPalette::LinkVisited, QColor(64, 128, 255));                  pal.setColor(QPalette::Active,   QPalette::LinkVisited, QColor(64, 128, 255));
583                  pal.setColor(QPalette::Inactive, QPalette::LinkVisited, QColor(64, 128, 255));                  pal.setColor(QPalette::Inactive, QPalette::LinkVisited, QColor(64, 128, 255));
584                  pal.setColor(QPalette::Disabled, QPalette::LinkVisited, QColor(54, 76, 119));                  pal.setColor(QPalette::Disabled, QPalette::LinkVisited, QColor(54, 76, 119));
585            #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
586                  mask = 0;                  mask = 0;
587            #endif
588                  ++result;                  ++result;
589          }          }
590          else          else
# Line 639  bool PaletteForm::namedPalette ( Line 646  bool PaletteForm::namedPalette (
646                  pal.setColor(QPalette::Active,   QPalette::LinkVisited, QColor(230, 100, 230));                  pal.setColor(QPalette::Active,   QPalette::LinkVisited, QColor(230, 100, 230));
647                  pal.setColor(QPalette::Inactive, QPalette::LinkVisited, QColor(230, 100, 230));                  pal.setColor(QPalette::Inactive, QPalette::LinkVisited, QColor(230, 100, 230));
648                  pal.setColor(QPalette::Disabled, QPalette::LinkVisited, QColor(74, 34, 74));                  pal.setColor(QPalette::Disabled, QPalette::LinkVisited, QColor(74, 34, 74));
649            #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
650                  mask = 0;                  mask = 0;
651            #endif
652                  ++result;                  ++result;
653          }          }
654          else          else
# Line 657  bool PaletteForm::namedPalette ( Line 666  bool PaletteForm::namedPalette (
666                                  pal.setColor(QPalette::Active,   cr, QColor(clist.at(0)));                                  pal.setColor(QPalette::Active,   cr, QColor(clist.at(0)));
667                                  pal.setColor(QPalette::Inactive, cr, QColor(clist.at(1)));                                  pal.setColor(QPalette::Inactive, cr, QColor(clist.at(1)));
668                                  pal.setColor(QPalette::Disabled, cr, QColor(clist.at(2)));                                  pal.setColor(QPalette::Disabled, cr, QColor(clist.at(2)));
669                            #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
670                                  mask &= ~(1 << int(cr));                                  mask &= ~(1 << int(cr));
671                            #endif
672                                  ++result;                                  ++result;
673                          }                          }
674                  }                  }
# Line 696  bool PaletteForm::namedPalette ( Line 707  bool PaletteForm::namedPalette (
707                  ++result;                  ++result;
708          }          }
709    
710    #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
711          pal.resolve(mask);          pal.resolve(mask);
712    #endif
713          return (result > 0);          return (result > 0);
714  }  }
715    

Legend:
Removed from v.3759  
changed lines
  Added in v.3760

  ViewVC Help
Powered by ViewVC