From 1367e3b1efc2b148a46bbfc5dac800bfe63e8df8 Mon Sep 17 00:00:00 2001 From: Hari Rana Date: Sun, 7 Jan 2024 22:59:30 -0500 Subject: [PATCH] mouse-panel: Port to AdwSwitchRow --- panels/mouse/cc-mouse-panel.c | 6 ++---- panels/mouse/cc-mouse-panel.ui | 16 +++++----------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/panels/mouse/cc-mouse-panel.c b/panels/mouse/cc-mouse-panel.c index 7ddb86ccd..5da21381a 100644 --- a/panels/mouse/cc-mouse-panel.c +++ b/panels/mouse/cc-mouse-panel.c @@ -58,8 +58,7 @@ struct _CcMousePanel CcSplitRow *touchpad_scroll_method_row; GtkListBoxRow *touchpad_speed_row; GtkScale *touchpad_speed_scale; - AdwActionRow *touchpad_toggle_row; - GtkSwitch *touchpad_toggle_switch; + AdwSwitchRow *touchpad_toggle_row; AdwSwitchRow *touchpad_typing_row; GSettings *mouse_settings; @@ -351,7 +350,7 @@ setup_dialog (CcMousePanel *self) gtk_widget_set_visible (GTK_WIDGET (self->touchpad_toggle_row), can_disable_touchpad (self)); g_settings_bind_with_mapping (self->touchpad_settings, "send-events", - self->touchpad_toggle_switch, "active", + self->touchpad_toggle_row, "active", G_SETTINGS_BIND_DEFAULT, touchpad_enabled_get_mapping, touchpad_enabled_set_mapping, @@ -527,7 +526,6 @@ cc_mouse_panel_class_init (CcMousePanelClass *klass) gtk_widget_class_bind_template_child (widget_class, CcMousePanel, touchpad_stack_page); gtk_widget_class_bind_template_child (widget_class, CcMousePanel, touchpad_speed_scale); gtk_widget_class_bind_template_child (widget_class, CcMousePanel, touchpad_toggle_row); - gtk_widget_class_bind_template_child (widget_class, CcMousePanel, touchpad_toggle_switch); gtk_widget_class_bind_template_child (widget_class, CcMousePanel, touchpad_typing_row); gtk_widget_class_bind_template_child (widget_class, CcMousePanel, two_finger_push_row); diff --git a/panels/mouse/cc-mouse-panel.ui b/panels/mouse/cc-mouse-panel.ui index 61ce4e200..578d84703 100644 --- a/panels/mouse/cc-mouse-panel.ui +++ b/panels/mouse/cc-mouse-panel.ui @@ -192,15 +192,9 @@ - + T_ouchpad True - touchpad_toggle_switch - - - center - - @@ -213,7 +207,7 @@ Po_inter Speed True - + True @@ -264,7 +258,7 @@ True Quickly touch the touchpad to click tap_to_click_switch - + center @@ -285,7 +279,7 @@ Drag two fingers on the touchpad _Edge Drag one finger on the edge - + @@ -299,7 +293,7 @@ T_raditional Scrolling moves the view _Natural - + Scrolling moves the content