mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-09-03 05:38:01 -04:00
Allow resizing of the mode buttons to take effect each time you change the application font.
This commit is contained in:
parent
70926b2a40
commit
c1da94ebf2
@ -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
|
// hook up save WAV file exit handling
|
||||||
connect (&m_saveWAVWatcher, &QFutureWatcher<QString>::finished, [this] {
|
connect (&m_saveWAVWatcher, &QFutureWatcher<QString>::finished, [this] {
|
||||||
// extract the promise from the future
|
// 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) + '}');
|
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 ())
|
for (auto& widget : qApp->topLevelWidgets ())
|
||||||
{
|
{
|
||||||
widget->updateGeometry ();
|
widget->updateGeometry ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user