mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-17 07:11:29 +02:00
Qt6: fix obsolete QPalette value
This commit is contained in:
@@ -15,7 +15,7 @@ ColorSchemeItem ColorScheme::GRAY = ColorSchemeItem("gray", "gray");
|
||||
|
||||
bool ColorScheme::hasDarkBackground(QWidget *widget) {
|
||||
int r, g, b;
|
||||
widget->palette().color(QPalette::Background).getRgb(&r, &g, &b);
|
||||
widget->palette().color(QPalette::Window).getRgb(&r, &g, &b);
|
||||
auto brightness = r + g + b;
|
||||
return brightness < (255*3/2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user