Setting to control whether the time is shown in the 'current page/total' label.

Apparently I am going to make millions with this new feature :D
This commit is contained in:
Luis Ángel San Martín
2025-07-18 14:51:33 +02:00
parent 6a4f9730f5
commit 41b7873263
7 changed files with 51 additions and 22 deletions

View File

@ -825,6 +825,7 @@ void Viewer::setMagnifyingGlassShown(bool shown)
void Viewer::informationSwitch()
{
informationLabel->updatePosition();
information ? informationLabel->hide() : informationLabel->show();
// informationLabel->move(QPoint((width()-informationLabel->width())/2,0));
information = !information;
@ -837,9 +838,16 @@ void Viewer::informationSwitch()
void Viewer::updateInformation()
{
if (render->hasLoadedComic()) {
informationLabel->setText(render->getCurrentPagesInformation() + " - " + QTime::currentTime().toString("HH:mm"));
auto displayTime = Configuration::getConfiguration().getShowTimeInInformation();
if (displayTime) {
informationLabel->setText(render->getCurrentPagesInformation() + " - " + QTime::currentTime().toString("HH:mm"));
} else {
informationLabel->setText(render->getCurrentPagesInformation());
}
informationLabel->adjustSize();
informationLabel->update(); // TODO it shouldn't be neccesary
informationLabel->updatePosition();
}
}
@ -1024,10 +1032,10 @@ void Viewer::showCursor()
void Viewer::updateOptions()
{
goToFlow->setFlowType(Configuration::getConfiguration().getFlowType());
updateBackgroundColor(Configuration::getConfiguration().getBackgroundColor());
updateContentSize();
updateInformation();
}
void Viewer::updateBackgroundColor(const QColor &color)