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 |
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 } |
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") { |
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 |
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 |
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 |
} |
} |
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 |
|
|