Move icon handling from Resources to gui/Icons (#5506)

This commit is contained in:
louib 2020-10-05 20:41:00 -04:00 committed by GitHub
parent ba8611cf4c
commit af4ecb4aa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 411 additions and 325 deletions

View file

@ -25,8 +25,8 @@
#include "autotype/AutoType.h"
#include "core/Config.h"
#include "core/Global.h"
#include "core/Resources.h"
#include "core/Translator.h"
#include "gui/Icons.h"
#include "gui/MainWindow.h"
#include "gui/osutils/OSUtils.h"
@ -93,8 +93,8 @@ ApplicationSettingsWidget::ApplicationSettingsWidget(QWidget* parent)
m_secUi->setupUi(m_secWidget);
m_generalUi->setupUi(m_generalWidget);
addPage(tr("General"), Resources::instance()->icon("preferences-other"), m_generalWidget);
addPage(tr("Security"), Resources::instance()->icon("security-high"), m_secWidget);
addPage(tr("General"), icons()->icon("preferences-other"), m_generalWidget);
addPage(tr("Security"), icons()->icon("security-high"), m_secWidget);
if (!autoType()->isAvailable()) {
m_generalUi->generalSettingsTabWidget->removeTab(1);
@ -254,7 +254,7 @@ void ApplicationSettingsWidget::loadSettings()
m_generalUi->trayIconAppearance->addItem(tr("Monochrome (light)"), "monochrome-light");
m_generalUi->trayIconAppearance->addItem(tr("Monochrome (dark)"), "monochrome-dark");
m_generalUi->trayIconAppearance->addItem(tr("Colorful"), "colorful");
int trayIconIndex = m_generalUi->trayIconAppearance->findData(resources()->trayIconAppearance());
int trayIconIndex = m_generalUi->trayIconAppearance->findData(icons()->trayIconAppearance());
if (trayIconIndex > 0) {
m_generalUi->trayIconAppearance->setCurrentIndex(trayIconIndex);
}