mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
Adds a 'Dim the home tab background' checkbox to the Home tab settings page (Appearance). When unchecked, HomeWidget skips the translucent black overlay it paints over the whole background. Default is on, preserving current behavior; the home tab repaints live on change.
93 lines
2.6 KiB
C++
93 lines
2.6 KiB
C++
#include "appearance_settings.h"
|
|
|
|
AppearanceSettings::AppearanceSettings(const QString &settingPath, QObject *parent)
|
|
: SettingsManager(settingPath + "appearance.ini", "appearance", QString(), parent)
|
|
{
|
|
}
|
|
|
|
QString AppearanceSettings::getThemeName() const
|
|
{
|
|
return getValue("themeName", QString(), QString()).toString();
|
|
}
|
|
|
|
void AppearanceSettings::setThemeName(const QString &_themeName)
|
|
{
|
|
setValue(_themeName, "themeName");
|
|
emit themeNameChanged();
|
|
}
|
|
|
|
bool AppearanceSettings::getStyleUserList() const
|
|
{
|
|
return getValue("styleUserList", QString(), QString(), true).toBool();
|
|
}
|
|
|
|
void AppearanceSettings::setStyleUserList(bool _styleUserList)
|
|
{
|
|
setValue(_styleUserList, "styleUserList");
|
|
emit styleUserListChanged();
|
|
}
|
|
|
|
int AppearanceSettings::getMaxFontSize() const
|
|
{
|
|
return getValue("maxFontSize", QString(), QString(), 12).toInt();
|
|
}
|
|
|
|
void AppearanceSettings::setMaxFontSize(int _max)
|
|
{
|
|
setValue(_max, "maxFontSize");
|
|
}
|
|
|
|
QString AppearanceSettings::getHomeTabBackgroundSource() const
|
|
{
|
|
return getValue("homeTabBackgroundSource", QString(), QString(), "themed").toString();
|
|
}
|
|
|
|
void AppearanceSettings::setHomeTabBackgroundSource(const QString &_backgroundSource)
|
|
{
|
|
setValue(_backgroundSource, "homeTabBackgroundSource");
|
|
emit homeTabBackgroundSourceChanged();
|
|
}
|
|
|
|
int AppearanceSettings::getHomeTabBackgroundShuffleFrequency() const
|
|
{
|
|
return getValue("homeTabBackgroundShuffleFrequency", QString(), QString(), 0).toInt();
|
|
}
|
|
|
|
void AppearanceSettings::setHomeTabBackgroundShuffleFrequency(int _frequency)
|
|
{
|
|
setValue(_frequency, "homeTabBackgroundShuffleFrequency");
|
|
emit homeTabBackgroundShuffleFrequencyChanged();
|
|
}
|
|
|
|
bool AppearanceSettings::getHomeTabDisplayCardName() const
|
|
{
|
|
return getValue("homeTabDisplayCardName", QString(), QString(), true).toBool();
|
|
}
|
|
|
|
void AppearanceSettings::setHomeTabDisplayCardName(bool _displayCardName)
|
|
{
|
|
setValue(_displayCardName, "homeTabDisplayCardName");
|
|
emit homeTabDisplayCardNameChanged();
|
|
}
|
|
|
|
bool AppearanceSettings::getHomeTabBackgroundDim() const
|
|
{
|
|
return getValue("homeTabBackgroundDim", QString(), QString(), true).toBool();
|
|
}
|
|
|
|
void AppearanceSettings::setHomeTabBackgroundDim(bool _dimBackground)
|
|
{
|
|
setValue(_dimBackground, "homeTabBackgroundDim");
|
|
emit homeTabBackgroundDimChanged();
|
|
}
|
|
|
|
int AppearanceSettings::getHomeTabButtonColorSourceIndex() const
|
|
{
|
|
return getValue("homeTabButtonColorSource", "", "", 0).toInt();
|
|
}
|
|
|
|
void AppearanceSettings::setHomeTabButtonColorSourceIndex(int index)
|
|
{
|
|
setValue(index, "homeTabButtonColorSource");
|
|
emit homeTabButtonColorChanged();
|
|
}
|