mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
Don't expose palette colors in UI theme editor
PR #22923. Fixes regression introduced by #22330.
This commit is contained in:
committed by
Vladimir Golovnev (Glassez)
parent
13282d94ef
commit
206d5abf84
@@ -80,8 +80,14 @@ inline QHash<QString, UIThemeColor> defaultUIThemeColors()
|
||||
{u"TransferList.StoppedUploading"_s, {Color::Primer::Light::doneFg, Color::Primer::Dark::doneFg}},
|
||||
{u"TransferList.Moving"_s, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.MissingFiles"_s, {Color::Primer::Light::dangerFg, Color::Primer::Dark::dangerFg}},
|
||||
{u"TransferList.Error"_s, {Color::Primer::Light::dangerFg, Color::Primer::Dark::dangerFg}},
|
||||
{u"TransferList.Error"_s, {Color::Primer::Light::dangerFg, Color::Primer::Dark::dangerFg}}
|
||||
};
|
||||
}
|
||||
|
||||
// Palette isn't customizable in default theme
|
||||
inline QHash<QString, UIThemeColor> defaultPaletteColors()
|
||||
{
|
||||
return {
|
||||
{u"Palette.Window"_s, {{}, {}}},
|
||||
{u"Palette.WindowText"_s, {{}, {}}},
|
||||
{u"Palette.Base"_s, {{}, {}}},
|
||||
|
||||
@@ -273,8 +273,6 @@ void UIThemeDialog::loadColors()
|
||||
int row = 2;
|
||||
for (const QString &id : colorIDs)
|
||||
{
|
||||
if (id == u"Log.Normal")
|
||||
qDebug() << "!!!!!!!";
|
||||
m_ui->colorsLayout->addWidget(new QLabel(id), row, 0);
|
||||
|
||||
const UIThemeColor &defaultColor = defaultColors.value(id);
|
||||
|
||||
@@ -105,6 +105,8 @@ DefaultThemeSource::DefaultThemeSource()
|
||||
, m_colors {defaultUIThemeColors()}
|
||||
{
|
||||
loadColors();
|
||||
// Palette isn't customizable in default theme
|
||||
m_colors.insert(defaultPaletteColors());
|
||||
}
|
||||
|
||||
QByteArray DefaultThemeSource::readStyleSheet()
|
||||
|
||||
Reference in New Issue
Block a user