Use palette for qml code for theming
Can't do it for QtWidgets code. We need to fully transition, before we can fully switch over probably.
This commit is contained in:
parent
384ef13c76
commit
d35cc3dda4
10 changed files with 43 additions and 39 deletions
|
|
@ -34,6 +34,7 @@ TimelineViewManager::updateColorPalette()
|
|||
lightActive.setColor(QPalette::ToolTipBase, lightActive.base().color());
|
||||
lightActive.setColor(QPalette::ToolTipText, lightActive.text().color());
|
||||
lightActive.setColor(QPalette::Link, QColor("#0077b5"));
|
||||
lightActive.setColor(QPalette::ButtonText, QColor("gray"));
|
||||
view->rootContext()->setContextProperty("currentActivePalette", lightActive);
|
||||
view->rootContext()->setContextProperty("currentInactivePalette", lightActive);
|
||||
} else if (settings->theme() == "dark") {
|
||||
|
|
@ -43,13 +44,14 @@ TimelineViewManager::updateColorPalette()
|
|||
/*dark*/ QColor("#2d3139"),
|
||||
/*mid*/ QColor(),
|
||||
/*text*/ QColor("#caccd1"),
|
||||
/*bright_text*/ QColor(),
|
||||
/*bright_text*/ QColor(0xff, 0xff, 0xff),
|
||||
/*base*/ QColor("#2d3139"),
|
||||
/*window*/ QColor("#202228"));
|
||||
darkActive.setColor(QPalette::Highlight, QColor("#e7e7e9"));
|
||||
darkActive.setColor(QPalette::ToolTipBase, darkActive.base().color());
|
||||
darkActive.setColor(QPalette::ToolTipText, darkActive.text().color());
|
||||
darkActive.setColor(QPalette::Link, QColor("#38a3d8"));
|
||||
darkActive.setColor(QPalette::ButtonText, QColor("gray"));
|
||||
view->rootContext()->setContextProperty("currentActivePalette", darkActive);
|
||||
view->rootContext()->setContextProperty("currentInactivePalette", darkActive);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue