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:
parent
7837bf416e
commit
b62e82e792
2 changed files with 4 additions and 12 deletions
|
|
@ -239,10 +239,11 @@ void MainWindow::setupControls()
|
||||||
ui->lineEditName->setVisible(false);
|
ui->lineEditName->setVisible(false);
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
|
|
||||||
ui->rbModeServer->setAttribute(Qt::WA_MacShowFocusRect, 0);
|
ui->rbModeServer->setAttribute(Qt::WA_MacShowFocusRect, 0);
|
||||||
ui->rbModeClient->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
|
#endif
|
||||||
|
|
||||||
const auto trayItemSize = QSize(24, 24);
|
const auto trayItemSize = QSize(24, 24);
|
||||||
|
|
|
||||||
|
|
@ -234,22 +234,13 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="btnSaveServerConfig">
|
<widget class="QPushButton" name="btnSaveServerConfig">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Export server configuration</string>
|
<string>Export server configuration</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="QIcon::ThemeIcon::DocumentSaveAs"/>
|
<iconset theme="QIcon::ThemeIcon::DocumentSaveAs"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>22</width>
|
|
||||||
<height>22</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue