Apply selected style to window elements on macOS
Qt doesn't apply the proper style to elements such as the title bar or text shadows, so this must be done in native code. Signed-off-by: Kenneth Chew <79120643+kthchew@users.noreply.github.com>
This commit is contained in:
@@ -174,6 +174,13 @@ void ThemeManager::initializeWidgets()
|
||||
themeDebugLog() << "<> Widget themes initialized.";
|
||||
}
|
||||
|
||||
#ifndef Q_OS_MACOS
|
||||
void ThemeManager::setTitlebarColorOnMac(WId windowId, QColor color)
|
||||
{}
|
||||
void ThemeManager::setTitlebarColorOfAllWindowsOnMac(QColor color)
|
||||
{}
|
||||
#endif
|
||||
|
||||
QList<IconTheme*> ThemeManager::getValidIconThemes()
|
||||
{
|
||||
QList<IconTheme*> ret;
|
||||
@@ -247,6 +254,7 @@ void ThemeManager::setApplicationTheme(const QString& name, bool initial)
|
||||
auto& theme = themeIter->second;
|
||||
themeDebugLog() << "applying theme" << theme->name();
|
||||
theme->apply(initial);
|
||||
setTitlebarColorOfAllWindowsOnMac(qApp->palette().window().color());
|
||||
|
||||
m_logColors = theme->logColorScheme();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user