Mercurial > minori
comparison src/gui/dialog/information.cc @ 324:5d3c9b31aa6e
anime: add completed date member
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 12 Jun 2024 23:03:22 -0400 |
parents | 91ac90a34003 |
children | 6b0768158dcd |
comparison
equal
deleted
inserted
replaced
323:1686fac290c5 | 324:5d3c9b31aa6e |
---|---|
228 [this](bool enabled, Date date) { _started = enabled ? date : Date(); }); | 228 [this](bool enabled, Date date) { _started = enabled ? date : Date(); }); |
229 date->setFixedWidth(LAYOUT_ITEM_WIDTH); | 229 date->setFixedWidth(LAYOUT_ITEM_WIDTH); |
230 _started = anime->GetUserDateStarted(); | 230 _started = anime->GetUserDateStarted(); |
231 if (!_started.IsValid()) { | 231 if (!_started.IsValid()) { |
232 date->SetEnabled(false); | 232 date->SetEnabled(false); |
233 _started = anime->GetAirDate(); | 233 _started = anime->GetStartedDate(); |
234 } | 234 } |
235 date->SetDate(_started); | 235 date->SetDate(_started); |
236 layout->addWidget(date, 1, 0); | 236 layout->addWidget(date, 1, 0); |
237 } | 237 } |
238 | 238 |
245 [this](bool enabled, Date date) { _completed = enabled ? date : Date(); }); | 245 [this](bool enabled, Date date) { _completed = enabled ? date : Date(); }); |
246 date->setFixedWidth(LAYOUT_ITEM_WIDTH); | 246 date->setFixedWidth(LAYOUT_ITEM_WIDTH); |
247 _completed = anime->GetUserDateCompleted(); | 247 _completed = anime->GetUserDateCompleted(); |
248 if (!_completed.IsValid()) { | 248 if (!_completed.IsValid()) { |
249 date->SetEnabled(false); | 249 date->SetEnabled(false); |
250 _completed = anime->GetAirDate(); | 250 _completed = anime->GetCompletedDate(); |
251 } | 251 } |
252 date->SetDate(_completed); | 252 date->SetDate(_completed); |
253 layout->addWidget(date, 1, 1); | 253 layout->addWidget(date, 1, 1); |
254 } | 254 } |
255 layout->setColumnStretch(layout->columnCount(), 1); | 255 layout->setColumnStretch(layout->columnCount(), 1); |