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>
This commit is contained in:
Dirk Hohndel 2020-11-04 13:09:44 -08:00
parent 4c6b00f812
commit 6201ac34b4
6 changed files with 33 additions and 14 deletions

View file

@ -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