mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03:00
MouseSettings: Set icons from GML
This commit is contained in:
parent
90b371ef47
commit
3ee32b6dbf
Notes:
sideshowbarker
2024-07-19 17:10:14 +09:00
Author: https://github.com/dykatz Commit: https://github.com/SerenityOS/serenity/commit/3ee32b6dbff Pull-request: https://github.com/SerenityOS/serenity/pull/12195 Reviewed-by: https://github.com/alimpfard
@ -23,7 +23,7 @@
|
||||
@GUI::Label {
|
||||
fixed_width: 32
|
||||
fixed_height: 32
|
||||
name: "cursor_speed_image_label"
|
||||
icon: "/res/graphics/mouse-cursor-speed.png"
|
||||
}
|
||||
|
||||
@GUI::Label {
|
||||
@ -72,7 +72,7 @@
|
||||
@GUI::Label {
|
||||
fixed_width: 32
|
||||
fixed_height: 32
|
||||
name: "scroll_step_size_image_label"
|
||||
icon: "/res/graphics/scroll-wheel-step-size.png"
|
||||
}
|
||||
|
||||
@GUI::Label {
|
||||
@ -176,7 +176,7 @@
|
||||
@GUI::Label {
|
||||
fixed_width: 32
|
||||
fixed_height: 32
|
||||
name: "switch_buttons_image_label"
|
||||
icon: "/res/graphics/switch-mouse-buttons.png"
|
||||
}
|
||||
|
||||
@GUI::CheckBox {
|
||||
|
@ -31,12 +31,6 @@ MouseWidget::MouseWidget()
|
||||
int const slider_value = float { speed_slider_scale } * GUI::WindowServerConnection::the().get_mouse_acceleration();
|
||||
m_speed_slider->set_value(slider_value);
|
||||
|
||||
auto& cursor_speed_image_label = *find_descendant_of_type_named<GUI::Label>("cursor_speed_image_label");
|
||||
cursor_speed_image_label.set_icon(Gfx::Bitmap::try_load_from_file("/res/graphics/mouse-cursor-speed.png").release_value_but_fixme_should_propagate_errors());
|
||||
|
||||
auto& scroll_step_size_image_label = *find_descendant_of_type_named<GUI::Label>("scroll_step_size_image_label");
|
||||
scroll_step_size_image_label.set_icon(Gfx::Bitmap::try_load_from_file("/res/graphics/scroll-wheel-step-size.png").release_value_but_fixme_should_propagate_errors());
|
||||
|
||||
m_scroll_length_spinbox = *find_descendant_of_type_named<GUI::SpinBox>("scroll_length_spinbox");
|
||||
m_scroll_length_spinbox->set_min(WindowServer::scroll_step_size_min);
|
||||
m_scroll_length_spinbox->set_value(GUI::WindowServerConnection::the().get_scroll_step_size());
|
||||
@ -53,8 +47,6 @@ MouseWidget::MouseWidget()
|
||||
m_double_click_speed_slider->set_value(GUI::WindowServerConnection::the().get_double_click_speed());
|
||||
m_switch_buttons_checkbox = *find_descendant_of_type_named<GUI::CheckBox>("switch_buttons_input");
|
||||
m_switch_buttons_checkbox->set_checked(GUI::WindowServerConnection::the().get_buttons_switched());
|
||||
auto& switch_buttons_image_label = *find_descendant_of_type_named<GUI::Label>("switch_buttons_image_label");
|
||||
switch_buttons_image_label.set_icon(Gfx::Bitmap::try_load_from_file("/res/graphics/switch-mouse-buttons.png").release_value_but_fixme_should_propagate_errors());
|
||||
}
|
||||
|
||||
void MouseWidget::apply_settings()
|
||||
|
Loading…
Reference in New Issue
Block a user