mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: switch themes on the mobile version
When changing the theme to a dark theme, also change the statistics theme. The code is a mess, because it crashes when setting the theme right at the beginning. Therefore, there is a "theme has been set" flag. Also, this directly accesses the ThemeInterface singleton object. I have no time to fight QML, sorry. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1cff14fa7f
commit
ba95edc2d2
3 changed files with 22 additions and 2 deletions
|
|
@ -49,6 +49,8 @@ signals:
|
|||
void binner2IndexChanged();
|
||||
void operation2IndexChanged();
|
||||
void sortMode1IndexChanged();
|
||||
private slots:
|
||||
void themeChanged();
|
||||
private:
|
||||
StatsView *view;
|
||||
ChartListModel *charts;
|
||||
|
|
@ -66,8 +68,8 @@ private:
|
|||
int operation2Index;
|
||||
int sortMode1Index;
|
||||
StatsState::UIState uiState; // Remember UI state so that we can interpret indexes
|
||||
bool themeInitialized; // setTheme() crashes if called in init()
|
||||
void updateUi();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue