From 4cd7c868ad9970e97d296e89b33cdaa14e8f24d6 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 24 May 2022 16:01:24 +0200 Subject: [PATCH] Qt6: fix obsolete QPalette value --- src/utils/ColorScheme.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/ColorScheme.cpp b/src/utils/ColorScheme.cpp index 6dffe26..32e8f64 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); }