mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 04:49:47 -07:00
parent
ae06daba6a
commit
d41a77841d
2 changed files with 9 additions and 0 deletions
|
@ -50,6 +50,8 @@
|
||||||
|
|
||||||
#include "ui_uithemedialog.h"
|
#include "ui_uithemedialog.h"
|
||||||
|
|
||||||
|
#define SETTINGS_KEY(name) u"GUI/UIThemeDialog/" name
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
Path userConfigPath()
|
Path userConfigPath()
|
||||||
|
@ -215,15 +217,20 @@ private:
|
||||||
UIThemeDialog::UIThemeDialog(QWidget *parent)
|
UIThemeDialog::UIThemeDialog(QWidget *parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
, m_ui {new Ui::UIThemeDialog}
|
, m_ui {new Ui::UIThemeDialog}
|
||||||
|
, m_storeDialogSize {SETTINGS_KEY(u"Size"_qs)}
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
loadColors();
|
loadColors();
|
||||||
loadIcons();
|
loadIcons();
|
||||||
|
|
||||||
|
if (const QSize dialogSize = m_storeDialogSize; dialogSize.isValid())
|
||||||
|
resize(dialogSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
UIThemeDialog::~UIThemeDialog()
|
UIThemeDialog::~UIThemeDialog()
|
||||||
{
|
{
|
||||||
|
m_storeDialogSize = size();
|
||||||
delete m_ui;
|
delete m_ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#include "base/settingvalue.h"
|
||||||
#include "uithemesource.h"
|
#include "uithemesource.h"
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
|
@ -60,6 +61,7 @@ private:
|
||||||
bool storeIcons();
|
bool storeIcons();
|
||||||
|
|
||||||
Ui::UIThemeDialog *m_ui;
|
Ui::UIThemeDialog *m_ui;
|
||||||
|
SettingValue<QSize> m_storeDialogSize;
|
||||||
|
|
||||||
DefaultThemeSource m_defaultThemeSource;
|
DefaultThemeSource m_defaultThemeSource;
|
||||||
QHash<QString, ColorWidget *> m_lightColorWidgets;
|
QHash<QString, ColorWidget *> m_lightColorWidgets;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue