diff --git a/src/infowindow.cpp b/src/infowindow.cpp index 5ec79dbe..847f38a7 100644 --- a/src/infowindow.cpp +++ b/src/infowindow.cpp @@ -31,6 +31,7 @@ InfoWindow::InfoWindow(QWidget *parent) : QWidget(parent) { setWindowTitle(tr("About")); m_layout = new QVBoxLayout(this); + m_layout->setAlignment(Qt::AlignHCenter); initLabels(); initInfoTable(); show(); @@ -57,7 +58,7 @@ QVector InfoWindow::m_description = { QT_TR_NOOP("Show color picker") }; - +#include void InfoWindow::initInfoTable() { QTableWidget *table = new QTableWidget(this); table->setToolTip(tr("Available shorcuts in the screen capture mode.")); @@ -82,15 +83,17 @@ void InfoWindow::initInfoTable() { table->resizeColumnsToContents(); table->resizeRowsToContents(); table->setMinimumWidth(400); + table->setMaximumWidth(600); table->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch); table->horizontalHeader()->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_layout->addStretch(); } void InfoWindow::initLabels() { m_layout->addStretch(); - QLabel *licenseTitleLabel = new QLabel(tr("License"), this); + QLabel *licenseTitleLabel = new QLabel(tr("License"), this); licenseTitleLabel->setAlignment(Qt::AlignHCenter); m_layout->addWidget(licenseTitleLabel); QLabel *licenseLabel = new QLabel("GPLv3+", this); @@ -98,15 +101,17 @@ void InfoWindow::initLabels() { m_layout->addWidget(licenseLabel); m_layout->addStretch(); - QLabel *versionTitleLabel = new QLabel(tr("Version"), this); + QLabel *versionTitleLabel = new QLabel(tr("Version"), this); versionTitleLabel->setAlignment(Qt::AlignHCenter); m_layout->addWidget(versionTitleLabel); - QLabel *versionLabel = new QLabel(APP_VERSION, this); + QString versionMsg = "Flameshot " + QString(APP_VERSION) + "\nCompiled with QT " + + QT_VERSION_STR; + QLabel *versionLabel = new QLabel(versionMsg, this); versionLabel->setAlignment(Qt::AlignHCenter); m_layout->addWidget(versionLabel); m_layout->addStretch(); m_layout->addSpacing(10); - QLabel *shortcutsTitleLabel = new QLabel(tr("Shortcuts"), this); + QLabel *shortcutsTitleLabel = new QLabel(tr("Shortcuts"), this); shortcutsTitleLabel->setAlignment(Qt::AlignHCenter);; m_layout->addWidget(shortcutsTitleLabel); }