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:
Kenneth Chew 2025-07-16 00:28:28 -04:00
parent 0dbaeef8a6
commit 3e65d3a9b5
No known key found for this signature in database
4 changed files with 91 additions and 0 deletions

View file

@ -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 {