The menus are now resizable
This commit is contained in:
@@ -39,5 +39,6 @@
|
||||
<file>img/configBlack/name_edition.png</file>
|
||||
<file>img/buttonIconsBlack/size_indicator.png</file>
|
||||
<file>img/buttonIconsWhite/size_indicator.png</file>
|
||||
<file>img/gplv3.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);});
|
||||
|
||||
@@ -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."));
|
||||
|
||||
@@ -119,6 +119,7 @@ void Controller::createVisualCapture(const QString &forcedSavePath) {
|
||||
void Controller::openConfigWindow() {
|
||||
if (!m_configWindow) {
|
||||
m_configWindow = new ConfigWindow();
|
||||
m_configWindow->show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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("<b>Shortcuts</b>"), this));
|
||||
initInfoTable();
|
||||
layout->addWidget(new QLabel(tr("<b>License</b>"), 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);
|
||||
|
||||
Reference in New Issue
Block a user