Mercurial > minori
comparison src/gui/dialog/settings/application.cc @ 400:2f4dc1580b84
anime_list: kind of properly display highlighted anime above others
...
| author | Paper <paper@tflc.us> |
|---|---|
| date | Fri, 07 Nov 2025 15:40:56 -0500 |
| parents | 963047512d34 |
| children |
comparison
equal
deleted
inserted
replaced
| 399:a0bc3ae5164a | 400:2f4dc1580b84 |
|---|---|
| 110 appearance_layout->addWidget(rating_combo_box); | 110 appearance_layout->addWidget(rating_combo_box); |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 | 113 |
| 114 { | 114 { |
| 115 /* Hopefully I made this easy to read... */ | 115 /* Hopefully I made this easy to read... |
| 116 * TODO: Call into the anime list page and tell it to re-sort everything. */ | |
| 116 QCheckBox *hl_above_anime_box = | 117 QCheckBox *hl_above_anime_box = |
| 117 new QCheckBox(tr("Display highlighted anime above others"), appearance_group_box); | 118 new QCheckBox(tr("Display highlighted anime above others"), appearance_group_box); |
| 118 hl_above_anime_box->setCheckState(highlighted_anime_above_others ? Qt::Checked : Qt::Unchecked); | 119 hl_above_anime_box->setCheckState(highlighted_anime_above_others ? Qt::Checked : Qt::Unchecked); |
| 119 hl_above_anime_box->setEnabled(highlight_anime_if_available); | 120 hl_above_anime_box->setEnabled(highlight_anime_if_available); |
| 120 hl_above_anime_box->setContentsMargins(10, 0, 0, 0); | 121 hl_above_anime_box->setContentsMargins(10, 0, 0, 0); |
| 121 | 122 |
| 122 connect(hl_above_anime_box, &QCheckBox::stateChanged, this, | 123 connect(hl_above_anime_box, &QCheckBox::stateChanged, this, |
| 123 [this](int state) { highlight_anime_if_available = !(state == Qt::Unchecked); }); | 124 [this](int state) { highlighted_anime_above_others = !(state == Qt::Unchecked); }); |
| 124 | 125 |
| 125 { | 126 { |
| 126 /* This is here because the above checkbox actually depends on it to be checked. */ | 127 /* This is here because the above checkbox actually depends on it to be checked. */ |
| 127 QCheckBox *hl_anime_box = new QCheckBox( | 128 QCheckBox *hl_anime_box = new QCheckBox( |
| 128 tr("Highlight anime if next episode is available in library folders"), appearance_group_box); | 129 tr("Highlight anime if next episode is available in library folders"), appearance_group_box); |
