Mercurial > minori
comparison src/gui/pages/statistics.cpp @ 37:9ae9365dd4ea
window.cpp: fix sidebar on Linux
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Thu, 21 Sep 2023 17:15:43 -0400 |
| parents | cde8f67a7c7d |
| children | d0adc4aedfc8 |
comparison
equal
deleted
inserted
replaced
| 36:2743011a6042 | 37:9ae9365dd4ea |
|---|---|
| 15 setLayout(new QVBoxLayout); | 15 setLayout(new QVBoxLayout); |
| 16 | 16 |
| 17 setFrameShape(QFrame::Panel); | 17 setFrameShape(QFrame::Panel); |
| 18 setFrameShadow(QFrame::Sunken); | 18 setFrameShadow(QFrame::Sunken); |
| 19 | 19 |
| 20 QPalette pal = QPalette(); | |
| 21 setAutoFillBackground(true); | |
| 22 setPalette(pal); | |
| 23 | |
| 20 UiUtils::LabelledTextParagraph* anime_list_paragraph = new UiUtils::LabelledTextParagraph( | 24 UiUtils::LabelledTextParagraph* anime_list_paragraph = new UiUtils::LabelledTextParagraph( |
| 21 "Anime list", | 25 "Anime list", |
| 22 "Anime count:\nEpisode count:\nTime spent watching:\nTime to complete:\nAverage score:\nScore deviation:", "\n\n\n\n\n", | 26 "Anime count:\nEpisode count:\nTime spent watching:\nTime to complete:\nAverage score:\nScore deviation:", "\n\n\n\n\n", |
| 23 this); | 27 this); |
| 24 anime_list_data = anime_list_paragraph->GetParagraph(); | 28 anime_list_data = anime_list_paragraph->GetParagraph(); |
| 28 application_data = application_paragraph->GetParagraph(); | 32 application_data = application_paragraph->GetParagraph(); |
| 29 | 33 |
| 30 layout()->addWidget(anime_list_paragraph); | 34 layout()->addWidget(anime_list_paragraph); |
| 31 layout()->addWidget(application_paragraph); | 35 layout()->addWidget(application_paragraph); |
| 32 ((QBoxLayout*)layout())->addStretch(); | 36 ((QBoxLayout*)layout())->addStretch(); |
| 33 | |
| 34 QPalette pal = QPalette(); | |
| 35 pal.setColor(QPalette::Window, Qt::white); | |
| 36 setAutoFillBackground(true); | |
| 37 setPalette(pal); | |
| 38 | 37 |
| 39 QTimer* timer = new QTimer(this); | 38 QTimer* timer = new QTimer(this); |
| 40 connect(timer, &QTimer::timeout, this, [this] { | 39 connect(timer, &QTimer::timeout, this, [this] { |
| 41 if (isVisible()) | 40 if (isVisible()) |
| 42 UpdateStatistics(); | 41 UpdateStatistics(); |
