aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/welcome_page.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2019-06-21 15:50:46 -0700
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2019-06-23 06:14:16 +0000
commit737b7eb6c6e0c0b06d512ed093d3de94ef698f35 (patch)
treeeab8bc846c374e2f5eb47a4ef37cc3c6366e2250 /ui/qt/welcome_page.h
parenta9ed94356d1b0cb149351e063014d3bdb94c0cd7 (diff)
Qt: Handle ApplicationPaletteChange events in the welcome page.
Update our various welcome page style sheets when we receive an ApplicationPaletteChange event. It looks like ApplicationPaletteChange is the proper way to detect a system-wide theme change, since we can infinitely recurse if we hold things wrong inside a regular PaletteChange event (I'm guessing setting CSS background and foreground colors were the culprits in this case). Switch from PaletteChange to ApplicationPaletteChange everywhere. Ping-Bug: 15511 Change-Id: I6e7aa627d9ca1d1d3872ab31620ea5c579061191 Reviewed-on: https://code.wireshark.org/review/33703 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'ui/qt/welcome_page.h')
-rw-r--r--ui/qt/welcome_page.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/qt/welcome_page.h b/ui/qt/welcome_page.h
index dce4a64e7e..73aa7f2218 100644
--- a/ui/qt/welcome_page.h
+++ b/ui/qt/welcome_page.h
@@ -37,6 +37,7 @@ public slots:
void interfaceSelected();
protected:
+ virtual bool event(QEvent *event);
virtual void resizeEvent(QResizeEvent *event);
virtual void changeEvent(QEvent* event);
@@ -46,6 +47,8 @@ protected slots:
void on_helpLabel_clicked();
private:
+ void updateStyleSheets();
+
Ui::WelcomePage *welcome_ui_;
QString flavor_;
QString show_in_str_;