WSL/SLF GitLab Repository

Commit 8e38a9b0 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Fixed some sizes

parent 8db3655b
......@@ -187,7 +187,7 @@ void WorkflowPanel::buildWorkflowSection(QDomElement &section)
panel_working_directory->addItem( "{inifile}" );
panel_working_directory->addItem( "{inifile}/../" );
panel_working_directory->addItem( QDir::currentPath() );
panel_working_directory->setSizeAdjustPolicy( QComboBox::AdjustToMinimumContentsLength );
panel_working_directory->setSizeAdjustPolicy( QComboBox::AdjustToMinimumContentsLengthWithIcon );
panel_working_directory->setEditable(true);
auto help_button = new QToolButton;
......
......@@ -140,8 +140,8 @@ Number::Number(const QString &section, const QString &key, const QDomNode &optio
validity_button_->setCursor(Qt::PointingHandCursor);
validity_button_->setFocusPolicy(Qt::NoFocus); //to be the same as in Textfield
QSize sz_label;
sz_label.setWidth(static_cast<int>(fontMetrics().boundingRect(Cst::u_warning).width()));
sz_label.setHeight(static_cast<int>(fontMetrics().boundingRect(Cst::u_warning).height()));
sz_label.setWidth(fontMetrics().boundingRect(Cst::u_warning).width());
sz_label.setHeight(fontMetrics().boundingRect(Cst::u_warning).height());
validity_button_->setFixedSize(sz_label);
validity_button_->setText(Cst::u_warning);
connect(validity_button_, &QToolButton::clicked, this, &Number::onValidButtonClicked);
......
......@@ -61,8 +61,9 @@ Textfield::Textfield(const QString &section, const QString &key, const QDomNode
validity_button_ = new QToolButton; //a button that can pop up if the text has a certain format
validity_button_->setStyleSheet("* {border: none}");
QSize sz_label;
sz_label.setWidth(static_cast<int>(fontMetrics().boundingRect(Cst::u_globe).width() * 1.2));
sz_label.setHeight(static_cast<int>(fontMetrics().boundingRect(Cst::u_globe).height()));
static const int maxSymbolWidth = std::max(fontMetrics().boundingRect(Cst::u_globe).width(), fontMetrics().boundingRect(Cst::u_warning).width());
sz_label.setWidth(maxSymbolWidth);
sz_label.setHeight(fontMetrics().boundingRect(Cst::u_globe).height());
validity_button_->setFixedSize(sz_label);
validity_button_->setFocusPolicy(Qt::NoFocus); //unexpected tab stops when invisible otherwise
connect(validity_button_, &QToolButton::clicked, this, &Textfield::onValidButtonClicked);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment