diff options
author | Filiph Sandström <filiph.sandstrom@filfatstudios.com> | 2022-12-04 21:09:27 +0100 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-12-08 07:04:09 -0500 |
commit | 01cdd3f18108decddfc4bb5ab6d73dc5469c390a (patch) | |
tree | c393744fa1dbf0ec34619ded87d7cb1448c0673a /Userland/Applications/MouseSettings | |
parent | 83380ebebc7ccf4b2d988f4d0add8e7fc33c350b (diff) | |
download | serenity-01cdd3f18108decddfc4bb5ab6d73dc5469c390a.zip |
WindowServer+MouseSettings: Improve `buttons_switched` naming
Before this commit it was a bit ambiguous which buttons the function
name were referring to; this instead now makes it clear that it's
related to mouse input. Additionally, this also fixes incorrect getter
naming leftover from yesteryear.
Diffstat (limited to 'Userland/Applications/MouseSettings')
-rw-r--r-- | Userland/Applications/MouseSettings/Mouse.gml | 2 | ||||
-rw-r--r-- | Userland/Applications/MouseSettings/MouseWidget.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Applications/MouseSettings/Mouse.gml b/Userland/Applications/MouseSettings/Mouse.gml index 6a4755e6e0..a2d77b59ee 100644 --- a/Userland/Applications/MouseSettings/Mouse.gml +++ b/Userland/Applications/MouseSettings/Mouse.gml @@ -182,7 +182,7 @@ } @GUI::CheckBox { - name: "switch_buttons_input" + name: "switch_buttons_checkbox" text: "Switch primary and secondary buttons" } } diff --git a/Userland/Applications/MouseSettings/MouseWidget.cpp b/Userland/Applications/MouseSettings/MouseWidget.cpp index c609714dbb..64d84e9db6 100644 --- a/Userland/Applications/MouseSettings/MouseWidget.cpp +++ b/Userland/Applications/MouseSettings/MouseWidget.cpp @@ -51,8 +51,8 @@ MouseWidget::MouseWidget() set_modified(true); }; - m_switch_buttons_checkbox = *find_descendant_of_type_named<GUI::CheckBox>("switch_buttons_input"); - m_switch_buttons_checkbox->set_checked(GUI::ConnectionToWindowServer::the().get_buttons_switched(), GUI::AllowCallback::No); + m_switch_buttons_checkbox = *find_descendant_of_type_named<GUI::CheckBox>("switch_buttons_checkbox"); + m_switch_buttons_checkbox->set_checked(GUI::ConnectionToWindowServer::the().are_mouse_buttons_switched(), GUI::AllowCallback::No); m_switch_buttons_checkbox->on_checked = [&](auto) { set_modified(true); }; @@ -74,7 +74,7 @@ void MouseWidget::apply_settings() GUI::ConnectionToWindowServer::the().async_set_mouse_acceleration(factor); GUI::ConnectionToWindowServer::the().async_set_scroll_step_size(m_scroll_length_spinbox->value()); GUI::ConnectionToWindowServer::the().async_set_double_click_speed(m_double_click_speed_slider->value()); - GUI::ConnectionToWindowServer::the().async_set_buttons_switched(m_switch_buttons_checkbox->is_checked()); + GUI::ConnectionToWindowServer::the().async_set_mouse_buttons_switched(m_switch_buttons_checkbox->is_checked()); GUI::ConnectionToWindowServer::the().async_set_natural_scroll(m_natural_scroll_checkbox->is_checked()); } |