refactor: use theme icon for document open fallback to the folder icon

This commit is contained in:
sithlord48 2024-11-09 12:07:38 -05:00 committed by Nick Bolton
parent 4359075b06
commit aba9c08352
4 changed files with 9 additions and 30 deletions

View File

@ -44,6 +44,10 @@ ServerConfigDialog::ServerConfigDialog(QWidget *parent, ServerConfig &config, Ap
{
ui->setupUi(this);
const auto folderIcon =
QIcon::fromTheme(QIcon::ThemeIcon::DocumentOpen, QIcon(QStringLiteral(":/icons/64x64/folder.png")));
ui->m_pButtonBrowseConfigFile->setIcon(folderIcon);
// force the first tab, since qt creator sets the active tab as the last one
// the developer was looking at, and it's easy to accidentally save that.
ui->m_pTabWidget->setCurrentIndex(0);

View File

@ -1098,16 +1098,6 @@ Enabling this setting will disable the server config GUI.</string>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>:/icons/64x64/folder.png</normaloff>:/icons/64x64/folder.png</iconset>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>13</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>

View File

@ -50,6 +50,11 @@ SettingsDialog::SettingsDialog(
ui->setupUi(this);
const auto folderIcon =
QIcon::fromTheme(QIcon::ThemeIcon::DocumentOpen, QIcon(QStringLiteral(":/icons/64x64/folder.png")));
ui->m_pPushButtonTlsCertPath->setIcon(folderIcon);
ui->m_pButtonBrowseLog->setIcon(folderIcon);
// force the first tab, since qt creator sets the active tab as the last one
// the developer was looking at, and it's easy to accidentally save that.
ui->m_pTabWidget->setCurrentIndex(0);

View File

@ -276,16 +276,6 @@
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>:/icons/64x64/folder.png</normaloff>:/icons/64x64/folder.png</iconset>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>13</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
@ -563,16 +553,6 @@
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>:/icons/64x64/folder.png</normaloff>:/icons/64x64/folder.png</iconset>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>13</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>