Add new Tips of the Day (#5603)

- Thanks WargiCorgi!
This commit is contained in:
Zach H 2025-02-10 16:22:26 -05:00 committed by GitHub
parent 7c9bf75393
commit 2dc614c6b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 226 additions and 99 deletions

View file

@ -88,8 +88,8 @@ DlgTipOfTheDay::DlgTipOfTheDay(QWidget *parent) : QDialog(parent)
setLayout(mainLayout);
setWindowTitle(tr("Tip of the Day"));
setMinimumWidth(500);
setMinimumHeight(300);
setMinimumWidth(700);
setMinimumHeight(500);
successfulInit = true;
}
@ -144,6 +144,7 @@ void DlgTipOfTheDay::updateTip(int tipId)
title->setText("<h2>" + titleText + "</h2>");
tipTextContent->setText(contentText);
tipTextContent->setTextFormat(Qt::RichText);
if (!image->load(imagePath)) {
qCDebug(DlgTipOfTheDayLog) << "Image failed to load from" << imagePath;
@ -159,6 +160,8 @@ void DlgTipOfTheDay::updateTip(int tipId)
tipNumber->setText("Tip " + QString::number(tipId + 1) + " / " + QString::number(tipDatabase->rowCount()));
currentTip = static_cast<unsigned int>(tipId);
adjustSize();
}
void DlgTipOfTheDay::resizeEvent(QResizeEvent *event)