refactor: MainWindow, convert btnSaveServerConfig to QPushButton set the icons size 22x22 only when not on macos, make sure the button is square on macos

This commit is contained in:
sithlord48
2025-06-05 10:56:24 -04:00
committed by Nick Bolton
parent 7837bf416e
commit b62e82e792
2 changed files with 4 additions and 12 deletions

View File

@ -239,10 +239,11 @@ void MainWindow::setupControls()
ui->lineEditName->setVisible(false);
#if defined(Q_OS_MAC)
ui->rbModeServer->setAttribute(Qt::WA_MacShowFocusRect, 0);
ui->rbModeClient->setAttribute(Qt::WA_MacShowFocusRect, 0);
ui->btnSaveServerConfig->setFixedWidth(ui->btnSaveServerConfig->height());
#else
ui->btnSaveServerConfig->setIconSize(QSize(22, 22));
#endif
const auto trayItemSize = QSize(24, 24);

View File

@ -234,22 +234,13 @@
</widget>
</item>
<item>
<widget class="QToolButton" name="btnSaveServerConfig">
<widget class="QPushButton" name="btnSaveServerConfig">
<property name="toolTip">
<string>Export server configuration</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="QIcon::ThemeIcon::DocumentSaveAs"/>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
</widget>
</item>
<item>