Cleanup Theme-related Code (#4450)

This commit is contained in:
nerix
2023-03-17 20:53:03 +01:00
committed by GitHub
parent 85b982bb69
commit 93a9e41d31
8 changed files with 94 additions and 215 deletions
@@ -149,7 +149,7 @@ void QuickSwitcherPopup::themeChangedEvent()
const QString selCol =
(this->theme->isLightTheme()
? "#68B1FF" // Copied from Theme::splits.input.styleSheet
: this->theme->tabs.selected.backgrounds.regular.color().name());
: this->theme->tabs.selected.backgrounds.regular.name());
const QString listStyle =
QString(
+2 -2
View File
@@ -51,12 +51,12 @@ void NotebookButton::paintEvent(QPaintEvent *event)
if (mouseDown_ || mouseOver_)
{
background = this->theme->tabs.regular.backgrounds.hover.color();
background = this->theme->tabs.regular.backgrounds.hover;
foreground = this->theme->tabs.regular.text;
}
else
{
background = this->theme->tabs.regular.backgrounds.regular.color();
background = this->theme->tabs.regular.backgrounds.regular;
foreground = this->theme->tabs.regular.text;
}
+1 -1
View File
@@ -109,7 +109,7 @@ void GenericListView::refreshTheme(const Theme &theme)
const QString selCol =
(theme.isLightTheme()
? "#68B1FF" // Copied from Theme::splits.input.styleSheet
: theme.tabs.selected.backgrounds.regular.color().name());
: theme.tabs.selected.backgrounds.regular.name());
const QString listStyle =
QString(
+3 -4
View File
@@ -688,10 +688,9 @@ void SplitContainer::paintEvent(QPaintEvent * /*event*/)
rect.top() + rect.height() / 2 + (s / 2));
}
QBrush accentColor =
(QApplication::activeWindow() == this->window()
? this->theme->tabs.selected.backgrounds.regular
: this->theme->tabs.selected.backgrounds.unfocused);
auto accentColor = (QApplication::activeWindow() == this->window()
? this->theme->tabs.selected.backgrounds.regular
: this->theme->tabs.selected.backgrounds.unfocused);
painter.fillRect(0, 0, width(), 1, accentColor);
}