desktop: allow update of tab widget colors at run time

Adding a new virtual function to all of these classes may seem like overkill,
but of course the idea is that likely we'd allow similar changes to all of
them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-11-02 12:10:33 -08:00
parent 00dd98163f
commit 7d18a525f1
7 changed files with 42 additions and 23 deletions

View file

@ -112,7 +112,7 @@ void TabDiveStatistics::updateData()
bool is_freedive = current_dive && current_dive->dc.divemode == FREEDIVE;
ui->divesAllText->setText(QString::number(stats_selection.selection_size));
ui->totalTimeAllText->setText(get_dive_duration_string(stats_selection.total_time.seconds, tr("h"), tr("min"), tr("sec"), " ", is_freedive));
int seconds = stats_selection.total_time.seconds;
if (stats_selection.selection_size)
seconds /= stats_selection.selection_size;