Qt6: fix obsolete QPalette value

This commit is contained in:
tobtoht 2022-05-24 16:01:24 +02:00
parent 49c9c15d6c
commit 4cd7c868ad
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -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);
}