Mercurial > minori
comparison src/gui/pages/statistics.cc @ 295:b82841e76e79
*: better support on Windows
things now look much better in dark mode
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sun, 12 May 2024 20:24:09 -0400 |
parents | 9a88e1725fd2 |
children | 91ac90a34003 |
comparison
equal
deleted
inserted
replaced
294:99cbc51433e4 | 295:b82841e76e79 |
---|---|
20 SECONDS, | 20 SECONDS, |
21 MINUTES | 21 MINUTES |
22 }; | 22 }; |
23 | 23 |
24 StatisticsPage::StatisticsPage(QWidget* parent) : QFrame(parent) { | 24 StatisticsPage::StatisticsPage(QWidget* parent) : QFrame(parent) { |
25 setBackgroundRole(QPalette::Base); | |
26 | |
25 QVBoxLayout* layout = new QVBoxLayout(this); | 27 QVBoxLayout* layout = new QVBoxLayout(this); |
26 | 28 |
27 setFrameShape(QFrame::Box); | 29 setFrameShape(QFrame::Box); |
28 setFrameShadow(QFrame::Sunken); | 30 setFrameShadow(QFrame::Sunken); |
29 | 31 |
104 const std::string_view& plural, bool always = false) { | 106 const std::string_view& plural, bool always = false) { |
105 if (amount > 0 || always) | 107 if (amount > 0 || always) |
106 str << amount << ((amount == 1) ? singular : plural); | 108 str << amount << ((amount == 1) ? singular : plural); |
107 }; | 109 }; |
108 | 110 |
111 /* for now, this function is very en_US specific */ | |
112 | |
109 std::ostringstream string; | 113 std::ostringstream string; |
110 add_time_segment(string, years, " year ", " years "); | 114 add_time_segment(string, years, " year ", " years "); |
111 add_time_segment(string, months, " month ", " months "); | 115 add_time_segment(string, months, " month ", " months "); |
112 add_time_segment(string, days, " day ", " days "); | 116 add_time_segment(string, days, " day ", " days "); |
113 add_time_segment(string, hours, " hour ", " hours "); | 117 add_time_segment(string, hours, " hour ", " hours "); |