summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets/maintab.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-11-04 13:09:44 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-11-04 14:47:10 -0800
commit6201ac34b412eb57e0ca03401da22ed9ae683c38 (patch)
tree5d41d1f3b69021918e1c74cef27f0cdd55e27c0f /desktop-widgets/tab-widgets/maintab.h
parent4c6b00f812757508118deee286886243485b3142 (diff)
downloadsubsurface-6201ac34b412eb57e0ca03401da22ed9ae683c38.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/tab-widgets/maintab.h')
-rw-r--r--desktop-widgets/tab-widgets/maintab.h2
1 files changed, 2 insertions, 0 deletions
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<TabBase*> 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