forked from osmocom/wireshark
Qt: Fix our ColorUtils::themeIsDark comparison.
Change-Id: Ice109cdd5451b67651f10da7e4001d6d4cb0c7f0 Reviewed-on: https://code.wireshark.org/review/32506 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
029f24e4cf
commit
c287fe2853
|
@ -143,7 +143,7 @@ QRgb ColorUtils::sequenceColor(int item)
|
|||
|
||||
bool ColorUtils::themeIsDark()
|
||||
{
|
||||
return wsApp->palette().windowText().color().lightness() < wsApp->palette().text().color().lightness();
|
||||
return wsApp->palette().windowText().color().lightness() > wsApp->palette().window().color().lightness();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -45,6 +45,12 @@ public:
|
|||
static QRgb graphColor(int item);
|
||||
static QRgb sequenceColor(int item);
|
||||
|
||||
/** Checks if our application is in "dark mode".
|
||||
* Dark mode is determined by comparing the application palette's window
|
||||
* text color with the window color.
|
||||
*
|
||||
* @return true if we're running in dark mode, false otherwise.
|
||||
*/
|
||||
static bool themeIsDark();
|
||||
|
||||
signals:
|
||||
|
|
Loading…
Reference in New Issue