diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index b59525ab6..a2ada0969 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -753,24 +753,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, } }); - // ensure a balanced layout of the mode buttons - qreal pointSize = m_config.text_font().pointSizeF(); - if (pointSize < 11) { - ui->houndButton->setMaximumWidth(40); - ui->ft8Button->setMaximumWidth(40); - ui->ft4Button->setMaximumWidth(40); - ui->msk144Button->setMaximumWidth(40); - ui->q65Button->setMaximumWidth(40); - ui->jt65Button->setMaximumWidth(40); - } else { - ui->houndButton->setMinimumWidth(50); - ui->ft8Button->setMinimumWidth(50); - ui->ft4Button->setMinimumWidth(50); - ui->msk144Button->setMinimumWidth(50); - ui->q65Button->setMinimumWidth(50); - ui->jt65Button->setMinimumWidth(50); - } - // hook up save WAV file exit handling connect (&m_saveWAVWatcher, &QFutureWatcher::finished, [this] { // extract the promise from the future @@ -1407,6 +1389,29 @@ void MainWindow::set_application_font (QFont const& font) } } qApp->setStyleSheet (ss + "* {" + font_as_stylesheet (font) + '}'); + // ensure a balanced layout of the mode buttons + qreal pointSize = m_config.text_font().pointSizeF(); + if (pointSize < 11) { + ui->houndButton->setMaximumWidth(40); + ui->ft8Button->setMaximumWidth(40); + ui->ft4Button->setMaximumWidth(40); + ui->msk144Button->setMaximumWidth(40); + ui->q65Button->setMaximumWidth(40); + ui->jt65Button->setMaximumWidth(40); + ui->houndButton->setMinimumWidth(0); + ui->ft8Button->setMinimumWidth(0); + ui->ft4Button->setMinimumWidth(0); + ui->msk144Button->setMinimumWidth(0); + ui->q65Button->setMinimumWidth(0); + ui->jt65Button->setMinimumWidth(0); + } else { + ui->houndButton->setMinimumWidth(50); + ui->ft8Button->setMinimumWidth(50); + ui->ft4Button->setMinimumWidth(50); + ui->msk144Button->setMinimumWidth(50); + ui->q65Button->setMinimumWidth(50); + ui->jt65Button->setMinimumWidth(50); + } for (auto& widget : qApp->topLevelWidgets ()) { widget->updateGeometry ();