mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 21:58:38 -05:00
Automatically set the width of the mode buttons depending on the font size.
This commit is contained in:
parent
55bc403f83
commit
cf9233b650
@ -745,25 +745,23 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
#if !defined(Q_OS_MAC)
|
// ensure a balanced layout of the mode buttons
|
||||||
// ensure a balanced layout of the mode buttons both on Windos and MacOS
|
qreal pointSize = m_config.text_font().pointSizeF();
|
||||||
ui->houndButton->setMaximumWidth(40);
|
if (pointSize < 12) {
|
||||||
ui->ft8Button->setMaximumWidth(40);
|
ui->houndButton->setMaximumWidth(40);
|
||||||
ui->ft4Button->setMaximumWidth(40);
|
ui->ft8Button->setMaximumWidth(40);
|
||||||
ui->msk144Button->setMaximumWidth(40);
|
ui->ft4Button->setMaximumWidth(40);
|
||||||
ui->q65Button->setMaximumWidth(40);
|
ui->msk144Button->setMaximumWidth(40);
|
||||||
ui->jt65Button->setMaximumWidth(40);
|
ui->q65Button->setMaximumWidth(40);
|
||||||
#endif
|
ui->jt65Button->setMaximumWidth(40);
|
||||||
|
} else {
|
||||||
#if defined(Q_OS_MAC)
|
ui->houndButton->setMinimumWidth(0);
|
||||||
// ensure a balanced layout of the mode buttons both on Windos and MacOS
|
ui->ft8Button->setMinimumWidth(0);
|
||||||
ui->houndButton->setMinimumWidth(0);
|
ui->ft4Button->setMinimumWidth(0);
|
||||||
ui->ft8Button->setMinimumWidth(0);
|
ui->msk144Button->setMinimumWidth(0);
|
||||||
ui->ft4Button->setMinimumWidth(0);
|
ui->q65Button->setMinimumWidth(0);
|
||||||
ui->msk144Button->setMinimumWidth(0);
|
ui->jt65Button->setMinimumWidth(0);
|
||||||
ui->q65Button->setMinimumWidth(0);
|
}
|
||||||
ui->jt65Button->setMinimumWidth(0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 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] {
|
||||||
|
Loading…
Reference in New Issue
Block a user