diff --git a/graphics.qrc b/graphics.qrc index 682941ca..9f6d0cc6 100644 --- a/graphics.qrc +++ b/graphics.qrc @@ -39,5 +39,6 @@ img/configBlack/name_edition.png img/buttonIconsBlack/size_indicator.png img/buttonIconsWhite/size_indicator.png + img/gplv3.png diff --git a/src/config/configwindow.cpp b/src/config/configwindow.cpp index ff0dcbf3..c5c81758 100644 --- a/src/config/configwindow.cpp +++ b/src/config/configwindow.cpp @@ -31,7 +31,7 @@ ConfigWindow::ConfigWindow(QWidget *parent) : QTabWidget(parent) { setAttribute(Qt::WA_DeleteOnClose); - setFixedSize(410, 540); + setMinimumSize(395, 490); setWindowIcon(QIcon(":img/flameshot.png")); setWindowTitle(tr("Configuration")); @@ -67,8 +67,6 @@ ConfigWindow::ConfigWindow(QWidget *parent) : QTabWidget(parent) { // general addTab(new GeneneralConf(), tr("General")); setTabIcon(2, QIcon(modifier + "config.png")); - - show(); } void ConfigWindow::keyPressEvent(QKeyEvent *e) { diff --git a/src/config/filenameeditor.cpp b/src/config/filenameeditor.cpp index 39da6a92..8a4d8686 100644 --- a/src/config/filenameeditor.cpp +++ b/src/config/filenameeditor.cpp @@ -32,7 +32,9 @@ FileNameEditor::FileNameEditor(QWidget *parent) : QGroupBox(parent) { void FileNameEditor::initLayout() { m_layout = new QVBoxLayout(this); - m_layout->addWidget(new QLabel(tr("Edit the name of your captures:"), this)); + auto infoLabel = new QLabel(tr("Edit the name of your captures:"), this); + infoLabel->setFixedHeight(20); + m_layout->addWidget(infoLabel); m_layout->addWidget(m_helperButtons); m_layout->addWidget(m_nameEditor); m_layout->addWidget(m_outputLabel); diff --git a/src/config/strftimechooserwidget.cpp b/src/config/strftimechooserwidget.cpp index 92e06539..e02d8c66 100644 --- a/src/config/strftimechooserwidget.cpp +++ b/src/config/strftimechooserwidget.cpp @@ -33,7 +33,7 @@ StrftimeChooserWidget::StrftimeChooserWidget(QWidget *parent) : QWidget(parent) QPushButton *button = new QPushButton(this); button->setText(tr(key.toStdString().data())); button->setToolTip(variable); - button->setFixedHeight(30); + button->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); layout->addWidget(button, j, i); connect(button, &QPushButton::clicked, this, [variable, this](){Q_EMIT variableEmitted(variable);}); diff --git a/src/config/uicoloreditor.cpp b/src/config/uicoloreditor.cpp index c5106df3..3a3e4306 100644 --- a/src/config/uicoloreditor.cpp +++ b/src/config/uicoloreditor.cpp @@ -64,7 +64,7 @@ void UIcolorEditor::initColorWheel() { &UIcolorEditor::updateLocalColor); m_colorWheel->setColor(m_uiColor); - m_colorWheel->setFixedSize(100,100); + m_colorWheel->setMinimumSize(100, 100); m_colorWheel->setToolTip(tr("Change the color moving the selectors and see" " the changes in the preview buttons.")); diff --git a/src/controller.cpp b/src/controller.cpp index 29d1f70f..23f35ee4 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -119,6 +119,7 @@ void Controller::createVisualCapture(const QString &forcedSavePath) { void Controller::openConfigWindow() { if (!m_configWindow) { m_configWindow = new ConfigWindow(); + m_configWindow->show(); } } diff --git a/src/infowindow.cpp b/src/infowindow.cpp index 1a4becc9..c52fabe8 100644 --- a/src/infowindow.cpp +++ b/src/infowindow.cpp @@ -27,7 +27,6 @@ InfoWindow::InfoWindow(QWidget *parent) : QWidget(parent) { setAttribute(Qt::WA_DeleteOnClose); - setFixedSize(400, 275); setWindowIcon(QIcon(":img/flameshot.png")); setWindowTitle(tr("About")); @@ -35,9 +34,12 @@ InfoWindow::InfoWindow(QWidget *parent) : QWidget(parent) { layout->addWidget(new QLabel(tr("Shortcuts"), this)); initInfoTable(); layout->addWidget(new QLabel(tr("License"), this)); - layout->addWidget(new QLabel("GPLv3+", this)); - // inform about full screen capture when no selection + 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(); } @@ -75,7 +77,6 @@ void InfoWindow::initInfoTable() { table->setSelectionMode(QAbstractItemView::NoSelection); table->setFocusPolicy(Qt::NoFocus); table->verticalHeader()->hide(); - table->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); // header creation QStringList names; names << tr("Key") << tr("Description"); @@ -88,6 +89,8 @@ void InfoWindow::initInfoTable() { // adjust size table->resizeColumnsToContents(); table->resizeRowsToContents(); + table->setMinimumWidth(400); + table->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch); table->horizontalHeader()->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);