optional dark style
This commit is contained in:
parent
41e1af64e5
commit
502a89feac
|
@ -71,30 +71,51 @@ void SkinFactory::loadSkinFromData(const Skin& skin) {
|
|||
QColor clr_link(QSL("#a1acc1"));
|
||||
QColor clr_dis_fg(QSL("#727272"));
|
||||
|
||||
//
|
||||
// Normal state.
|
||||
fusion_palette.setColor(QPalette::Window, clr_bg);
|
||||
fusion_palette.setColor(QPalette::WindowText, clr_fg);
|
||||
fusion_palette.setColor(QPalette::Base, clr_bg);
|
||||
fusion_palette.setColor(QPalette::AlternateBase, clr_altbg);
|
||||
fusion_palette.setColor(QPalette::ToolTipBase, clr_altbg);
|
||||
fusion_palette.setColor(QPalette::ToolTipText, clr_fg);
|
||||
fusion_palette.setColor(QPalette::Text, clr_fg);
|
||||
fusion_palette.setColor(QPalette::Button, clr_altbg);
|
||||
fusion_palette.setColor(QPalette::ButtonText, clr_fg);
|
||||
fusion_palette.setColor(QPalette::BrightText, clr_fg);
|
||||
fusion_palette.setColor(QPalette::Link, clr_link);
|
||||
fusion_palette.setColor(QPalette::Highlight, clr_selbg);
|
||||
fusion_palette.setColor(QPalette::HighlightedText, clr_fg);
|
||||
//
|
||||
|
||||
// Backgrounds & bases.
|
||||
fusion_palette.setColor(QPalette::ColorRole::Window, clr_bg);
|
||||
fusion_palette.setColor(QPalette::ColorRole::Base, clr_bg);
|
||||
fusion_palette.setColor(QPalette::ColorRole::AlternateBase, clr_altbg);
|
||||
fusion_palette.setColor(QPalette::ColorRole::ToolTipBase, clr_altbg);
|
||||
fusion_palette.setColor(QPalette::ColorRole::Button, clr_altbg);
|
||||
fusion_palette.setColor(QPalette::ColorRole::Highlight, clr_selbg);
|
||||
|
||||
// Texts.
|
||||
fusion_palette.setColor(QPalette::ColorRole::WindowText, clr_fg);
|
||||
fusion_palette.setColor(QPalette::ColorRole::ToolTipText, clr_fg);
|
||||
fusion_palette.setColor(QPalette::ColorRole::ButtonText, clr_fg);
|
||||
fusion_palette.setColor(QPalette::ColorRole::BrightText, clr_fg);
|
||||
fusion_palette.setColor(QPalette::ColorRole::Text, clr_fg);
|
||||
fusion_palette.setColor(QPalette::ColorRole::PlaceholderText, clr_fg);
|
||||
fusion_palette.setColor(QPalette::ColorRole::Link, clr_link);
|
||||
fusion_palette.setColor(QPalette::ColorRole::LinkVisited, clr_link);
|
||||
fusion_palette.setColor(QPalette::ColorRole::HighlightedText, clr_fg);
|
||||
|
||||
//
|
||||
// Disabled state.
|
||||
fusion_palette.setColor(QPalette::Disabled, QPalette::Text, clr_dis_fg);
|
||||
fusion_palette.setColor(QPalette::Disabled, QPalette::WindowText, clr_dis_fg);
|
||||
fusion_palette.setColor(QPalette::Disabled, QPalette::ButtonText, clr_dis_fg);
|
||||
fusion_palette.setColor(QPalette::Disabled, QPalette::Button, Qt::GlobalColor::red);
|
||||
fusion_palette.setColor(QPalette::Disabled, QPalette::HighlightedText, clr_fg);
|
||||
fusion_palette.setColor(QPalette::Disabled, QPalette::Base, clr_altbg);
|
||||
fusion_palette.setColor(QPalette::Disabled, QPalette::Window, clr_altbg);
|
||||
fusion_palette.setColor(QPalette::Disabled, QPalette::Highlight, clr_selbg);
|
||||
//
|
||||
|
||||
// Backgrounds & bases.
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Window, clr_altbg);
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Base, clr_altbg);
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::AlternateBase, clr_altbg);
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::ToolTipBase, clr_altbg);
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Button, Qt::GlobalColor::red);
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Highlight, clr_selbg);
|
||||
|
||||
// Texts.
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::WindowText, clr_dis_fg);
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::ToolTipText, clr_fg);
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::ButtonText, clr_dis_fg);
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::BrightText, clr_fg);
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Text, clr_dis_fg);
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::PlaceholderText, clr_fg);
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Link, clr_link);
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::LinkVisited, clr_link);
|
||||
fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::HighlightedText, clr_fg);
|
||||
|
||||
QToolTip::setPalette(fusion_palette);
|
||||
qApp->setPalette(fusion_palette);
|
||||
|
|
Loading…
Reference in New Issue