From 6201ac34b412eb57e0ca03401da22ed9ae683c38 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 4 Nov 2020 13:09:44 -0800 Subject: desktop: automatically pick a good theme title color The preference setting seemed far too strange to do this. And not very user friendly. So instead we figure out if this is a dark theme or not by looking at text and background colors in the palette, and make sure we get notified if that changes. Signed-off-by: Dirk Hohndel --- desktop-widgets/tab-widgets/maintab.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'desktop-widgets/tab-widgets/maintab.h') diff --git a/desktop-widgets/tab-widgets/maintab.h b/desktop-widgets/tab-widgets/maintab.h index ea7240d08..5ec4e6096 100644 --- a/desktop-widgets/tab-widgets/maintab.h +++ b/desktop-widgets/tab-widgets/maintab.h @@ -78,6 +78,8 @@ private: dive_trip *currentTrip; QList extraWidgets; void divesEdited(int num); // Opens a warning window if more than one dive was edited + void changeEvent(QEvent *ev) override; + bool isDark; }; #endif // MAINTAB_H -- cgit v1.2.3-70-g09d2