mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Merge 1fc139117b into d2fa7cf7f7
This commit is contained in:
commit
2e9135abd8
1 changed files with 0 additions and 9 deletions
|
|
@ -31,15 +31,6 @@ void ThemeManager::setTitlebarColorOnMac(WId windowId, QColor color)
|
|||
window.titlebarAppearsTransparent = YES;
|
||||
window.backgroundColor = [NSColor colorWithRed:color.redF() green:color.greenF() blue:color.blueF() alpha:color.alphaF()];
|
||||
|
||||
// Unfortunately there seems to be no easy way to set the titlebar text color.
|
||||
// The closest we can do without dubious hacks is set the dark/light mode state based on the brightness of the
|
||||
// background color, which should at least make the text readable even if we can't use the theme's text color.
|
||||
// It's a good idea to set this anyway since it also affects some other UI elements like text shadows (PrismLauncher#3825).
|
||||
if (color.lightnessF() < 0.5) {
|
||||
window.appearance = [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
|
||||
} else {
|
||||
window.appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua];
|
||||
}
|
||||
}
|
||||
|
||||
void ThemeManager::setTitlebarColorOfAllWindowsOnMac(QColor color)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue