diff --git a/graphics.qrc b/graphics.qrc index 9f6d0cc6..682941ca 100644 --- a/graphics.qrc +++ b/graphics.qrc @@ -39,6 +39,5 @@ img/configBlack/name_edition.png img/buttonIconsBlack/size_indicator.png img/buttonIconsWhite/size_indicator.png - img/gplv3.png diff --git a/img/gplv3.png b/img/gplv3.png deleted file mode 100644 index 3e9136e6..00000000 Binary files a/img/gplv3.png and /dev/null differ diff --git a/src/config/geneneralconf.cpp b/src/config/geneneralconf.cpp index 7845764d..39f53517 100644 --- a/src/config/geneneralconf.cpp +++ b/src/config/geneneralconf.cpp @@ -85,7 +85,7 @@ void GeneneralConf::initShowTrayIcon() { ConfigHandler config; bool checked = !config.getDisabledTrayIcon(); m_showTray->setChecked(checked); - m_showTray->setToolTip(tr("Show systemtray icons")); + m_showTray->setToolTip(tr("Show the systemtray icon")); m_layout->addWidget(m_showTray); connect(m_showTray, &QCheckBox::clicked, this, diff --git a/src/config/uicoloreditor.cpp b/src/config/uicoloreditor.cpp index bf278189..69416490 100644 --- a/src/config/uicoloreditor.cpp +++ b/src/config/uicoloreditor.cpp @@ -118,6 +118,7 @@ void UIcolorEditor::initButtons() { h2->addWidget(frame2); frame2->setFixedSize(frameSize, frameSize); m_labelContrast = new ClickableLabel(tr("Contrast Color"), this); + m_labelContrast->setStyleSheet("color : gray"); h2->addWidget(m_labelContrast); m_vLayout->addLayout(h2); diff --git a/src/infowindow.cpp b/src/infowindow.cpp index c52fabe8..5ec79dbe 100644 --- a/src/infowindow.cpp +++ b/src/infowindow.cpp @@ -30,22 +30,14 @@ InfoWindow::InfoWindow(QWidget *parent) : QWidget(parent) { setWindowIcon(QIcon(":img/flameshot.png")); setWindowTitle(tr("About")); - layout = new QVBoxLayout(this); - layout->addWidget(new QLabel(tr("Shortcuts"), this)); + m_layout = new QVBoxLayout(this); + initLabels(); initInfoTable(); - layout->addWidget(new QLabel(tr("License"), this)); - - auto imgGPL = new QLabel(this); - imgGPL->setStyleSheet("background: white; border-color: black; border-width: 2px"); - imgGPL->setPixmap(QPixmap(":img/gplv3.png")); - imgGPL->setFixedWidth(imgGPL->pixmap()->width()); - layout->addWidget(imgGPL); - show(); } -QVector InfoWindow::keys = { +QVector InfoWindow::m_keys = { "←↓↑→", "SHIFT + ←↓↑→", "ESC", @@ -55,7 +47,7 @@ QVector InfoWindow::keys = { QT_TR_NOOP("Right Click") }; -QVector InfoWindow::description = { +QVector InfoWindow::m_description = { QT_TR_NOOP("Move selection 1px"), QT_TR_NOOP("Resize selection 1px"), QT_TR_NOOP("Quit capture"), @@ -70,10 +62,10 @@ void InfoWindow::initInfoTable() { QTableWidget *table = new QTableWidget(this); table->setToolTip(tr("Available shorcuts in the screen capture mode.")); - layout->addWidget(table); + m_layout->addWidget(table); table->setColumnCount(2); - table->setRowCount(keys.size()); + table->setRowCount(m_keys.size()); table->setSelectionMode(QAbstractItemView::NoSelection); table->setFocusPolicy(Qt::NoFocus); table->verticalHeader()->hide(); @@ -82,9 +74,9 @@ void InfoWindow::initInfoTable() { names << tr("Key") << tr("Description"); table->setHorizontalHeaderLabels(names); //add content - for (int i= 0; i < keys.size(); ++i){ - table->setItem(i, 0, new QTableWidgetItem(tr(keys.at(i)))); - table->setItem(i, 1, new QTableWidgetItem(tr(description.at(i)))); + for (int i= 0; i < m_keys.size(); ++i){ + table->setItem(i, 0, new QTableWidgetItem(tr(m_keys.at(i)))); + table->setItem(i, 1, new QTableWidgetItem(tr(m_description.at(i)))); } // adjust size table->resizeColumnsToContents(); @@ -96,6 +88,29 @@ void InfoWindow::initInfoTable() { QSizePolicy::Expanding); } +void InfoWindow::initLabels() { + m_layout->addStretch(); + QLabel *licenseTitleLabel = new QLabel(tr("License"), this); + licenseTitleLabel->setAlignment(Qt::AlignHCenter); + m_layout->addWidget(licenseTitleLabel); + QLabel *licenseLabel = new QLabel("GPLv3+", this); + licenseLabel->setAlignment(Qt::AlignHCenter); + m_layout->addWidget(licenseLabel); + m_layout->addStretch(); + + QLabel *versionTitleLabel = new QLabel(tr("Version"), this); + versionTitleLabel->setAlignment(Qt::AlignHCenter); + m_layout->addWidget(versionTitleLabel); + QLabel *versionLabel = new QLabel(APP_VERSION, this); + versionLabel->setAlignment(Qt::AlignHCenter); + m_layout->addWidget(versionLabel); + m_layout->addStretch(); + m_layout->addSpacing(10); + QLabel *shortcutsTitleLabel = new QLabel(tr("Shortcuts"), this); + shortcutsTitleLabel->setAlignment(Qt::AlignHCenter);; + m_layout->addWidget(shortcutsTitleLabel); +} + void InfoWindow::keyPressEvent(QKeyEvent *e) { if (e->key() == Qt::Key_Escape) { close(); diff --git a/src/infowindow.h b/src/infowindow.h index 5a56a8fc..b88f64b9 100644 --- a/src/infowindow.h +++ b/src/infowindow.h @@ -31,11 +31,12 @@ protected: void keyPressEvent(QKeyEvent *); private: - void initInfoTable(); - QVBoxLayout *layout; + inline void initInfoTable(); + inline void initLabels(); + QVBoxLayout *m_layout; - static QVector keys; - static QVector description; + static QVector m_keys; + static QVector m_description; }; #endif // INFOWINDOW_H