diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2022-08-15 06:00:33 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-16 16:53:00 +0200 |
commit | a74f512f6b5485bc4033e60bd10503597e8eeb07 (patch) | |
tree | 7b78965ac02125d2d15ab1c58c84ce4d4a42fa39 /Userland/Applications/DisplaySettings | |
parent | d286bf85e6974c309507a8a845770c306b3bdefd (diff) | |
download | serenity-a74f512f6b5485bc4033e60bd10503597e8eeb07.zip |
LibGUI+WindowServer+DisplaySettings: Add Tooltips to SystemEffects
Tooltips can now be toggled on and off system-wide.
Diffstat (limited to 'Userland/Applications/DisplaySettings')
-rw-r--r-- | Userland/Applications/DisplaySettings/EffectsSettings.gml | 5 | ||||
-rw-r--r-- | Userland/Applications/DisplaySettings/EffectsSettingsWidget.cpp | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Userland/Applications/DisplaySettings/EffectsSettings.gml b/Userland/Applications/DisplaySettings/EffectsSettings.gml index e0d62078f0..b0443358e1 100644 --- a/Userland/Applications/DisplaySettings/EffectsSettings.gml +++ b/Userland/Applications/DisplaySettings/EffectsSettings.gml @@ -96,6 +96,11 @@ text: "Show knurls on splitters" } + @GUI::CheckBox { + name: "tooltips_checkbox" + text: "Show tooltips" + } + @GUI::Widget { fixed_height: 4 } diff --git a/Userland/Applications/DisplaySettings/EffectsSettingsWidget.cpp b/Userland/Applications/DisplaySettings/EffectsSettingsWidget.cpp index 0d11ac467a..e69e813065 100644 --- a/Userland/Applications/DisplaySettings/EffectsSettingsWidget.cpp +++ b/Userland/Applications/DisplaySettings/EffectsSettingsWidget.cpp @@ -68,6 +68,12 @@ EffectsSettingsWidget::EffectsSettingsWidget() m_system_effects.effects().at(Effects::SplitterKnurls) = checked; set_modified(true); }; + auto& tooltips = *find_descendant_of_type_named<GUI::CheckBox>("tooltips_checkbox"); + tooltips.set_checked(m_system_effects.tooltips()); + tooltips.on_checked = [this](bool checked) { + m_system_effects.effects().at(Effects::Tooltips) = checked; + set_modified(true); + }; auto& menu_shadow = *find_descendant_of_type_named<GUI::CheckBox>("menu_shadow_checkbox"); menu_shadow.set_checked(m_system_effects.menu_shadow()); menu_shadow.on_checked = [this](bool checked) { @@ -98,6 +104,7 @@ ErrorOr<void> EffectsSettingsWidget::load_settings() ws_config->read_bool_entry("Effects", "SmoothScrolling", true), ws_config->read_bool_entry("Effects", "TabAccents", true), ws_config->read_bool_entry("Effects", "SplitterKnurls", true), + ws_config->read_bool_entry("Effects", "Tooltips", true), ws_config->read_bool_entry("Effects", "MenuShadow", true), ws_config->read_bool_entry("Effects", "WindowShadow", true), ws_config->read_bool_entry("Effects", "TooltipShadow", true), |