UI: MyFort: About: Show release text in scroll area

This commit is contained in:
Nodir Temirkhodjaev 2024-01-16 16:52:08 +03:00
parent a08ff344ab
commit 2473be1763
2 changed files with 6 additions and 3 deletions

View File

@ -51,17 +51,19 @@ void AboutPage::setupNewVersionBox()
m_labelRelease->setWordWrap(true);
m_labelRelease->setOpenExternalLinks(true);
m_labelArea = ControlUtil::wrapToScrollArea(m_labelRelease);
m_labelArea->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
// Buttons
auto buttonsLayout = setupButtonsLayout();
auto layout = new QVBoxLayout();
layout->setSpacing(10);
layout->addWidget(m_labelRelease);
layout->addWidget(m_labelArea);
layout->addLayout(buttonsLayout);
m_gbNewVersion = new QGroupBox();
m_gbNewVersion->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
m_gbNewVersion->setMinimumWidth(380);
m_gbNewVersion->setLayout(layout);
}
@ -94,7 +96,7 @@ void AboutPage::setupNewVersionUpdate()
auto updateChecker = taskManager()->taskInfoUpdateChecker();
m_isNewVersion = updateChecker->isNewVersion();
m_labelRelease->setVisible(m_isNewVersion);
m_labelArea->setVisible(m_isNewVersion);
m_labelRelease->setText(updateChecker->releaseText());
m_btDownload->setVisible(m_isNewVersion);

View File

@ -26,6 +26,7 @@ private:
QGroupBox *m_gbNewVersion = nullptr;
QLabel *m_labelRelease = nullptr;
QWidget *m_labelArea = nullptr;
QToolButton *m_btDownload = nullptr;
QToolButton *m_btCheckUpdate = nullptr;
};