mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-11 05:57:58 -05:00
configuration_shared: Initial functions and data for manual tristate
Sets up initial support for implementing colored tristate functions. These functions color a QWidget blue when it's overriding a global setting, and discolor it when not. The lack of color indicates it uses the global state, replacing the Qt::CheckState::PartiallyChecked state with the global state.
This commit is contained in:
@ -15,8 +15,20 @@ constexpr int USE_GLOBAL_INDEX = 0;
|
||||
constexpr int USE_GLOBAL_SEPARATOR_INDEX = 1;
|
||||
constexpr int USE_GLOBAL_OFFSET = 2;
|
||||
|
||||
enum CheckState {
|
||||
Off,
|
||||
On,
|
||||
Global,
|
||||
Count,
|
||||
};
|
||||
|
||||
struct Trackers {
|
||||
} extern trackers;
|
||||
|
||||
// Global-aware apply and set functions
|
||||
|
||||
void ApplyPerGameSetting(Settings::Setting<bool>* setting, const QCheckBox* checkbox,
|
||||
const CheckState& tracker);
|
||||
void ApplyPerGameSetting(Settings::Setting<bool>* setting, const QCheckBox* checkbox);
|
||||
void ApplyPerGameSetting(Settings::Setting<int>* setting, const QComboBox* combobox);
|
||||
void ApplyPerGameSetting(Settings::Setting<Settings::RendererBackend>* setting,
|
||||
@ -31,6 +43,10 @@ void SetPerGameSetting(QComboBox* combobox,
|
||||
void SetPerGameSetting(QComboBox* combobox,
|
||||
const Settings::Setting<Settings::GPUAccuracy>* setting);
|
||||
|
||||
void SetBGColor(QWidget* widget, bool highlighted);
|
||||
void SetColoredTristate(QCheckBox* checkbox, Settings::Setting<bool>& setting,
|
||||
ConfigurationShared::CheckState& tracker);
|
||||
|
||||
void InsertGlobalItem(QComboBox* combobox);
|
||||
|
||||
} // namespace ConfigurationShared
|
||||
|
Reference in New Issue
Block a user