From: tobtoht Date: Tue, 24 May 2022 14:01:24 +0000 (+0200) Subject: Qt6: fix obsolete QPalette value X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=4cd7c868ad9970e97d296e89b33cdaa14e8f24d6;p=gamesguru%2Ffeather.git Qt6: fix obsolete QPalette value --- diff --git a/src/utils/ColorScheme.cpp b/src/utils/ColorScheme.cpp index 6dffe26b..32e8f640 100644 --- a/src/utils/ColorScheme.cpp +++ b/src/utils/ColorScheme.cpp @@ -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); }