From 3ee642e42185ffd6f23b1fa313129a11826902c8 Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Mon, 20 Dec 2021 13:07:54 -0800 Subject: [PATCH] net-device-bluetooth: Use AdwActionRow and .boxed-list This makes both the row and the list fit in better with the rest of the page. --- panels/network/net-device-bluetooth.c | 7 +-- panels/network/network-bluetooth.ui | 69 ++++++++++----------------- 2 files changed, 28 insertions(+), 48 deletions(-) diff --git a/panels/network/net-device-bluetooth.c b/panels/network/net-device-bluetooth.c index 74dfb0e9a..350d8b8f9 100644 --- a/panels/network/net-device-bluetooth.c +++ b/panels/network/net-device-bluetooth.c @@ -24,6 +24,7 @@ #include #include +#include #include @@ -35,7 +36,7 @@ struct _NetDeviceBluetooth { GtkBox parent; - GtkLabel *device_label; + AdwActionRow *row; GtkSwitch *device_off_switch; GtkButton *options_button; GtkSeparator *separator; @@ -168,7 +169,7 @@ net_device_bluetooth_class_init (NetDeviceBluetoothClass *klass) gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/network/network-bluetooth.ui"); - gtk_widget_class_bind_template_child (widget_class, NetDeviceBluetooth, device_label); + gtk_widget_class_bind_template_child (widget_class, NetDeviceBluetooth, row); gtk_widget_class_bind_template_child (widget_class, NetDeviceBluetooth, device_off_switch); gtk_widget_class_bind_template_child (widget_class, NetDeviceBluetooth, options_button); gtk_widget_class_bind_template_child (widget_class, NetDeviceBluetooth, separator); @@ -216,5 +217,5 @@ void net_device_bluetooth_set_title (NetDeviceBluetooth *self, const gchar *title) { g_return_if_fail (NET_IS_DEVICE_BLUETOOTH (self)); - gtk_label_set_label (self->device_label, title); + adw_preferences_row_set_title (ADW_PREFERENCES_ROW (self->row), title); } diff --git a/panels/network/network-bluetooth.ui b/panels/network/network-bluetooth.ui index 14ec590fc..216c95c8d 100644 --- a/panels/network/network-bluetooth.ui +++ b/panels/network/network-bluetooth.ui @@ -12,55 +12,34 @@ none - - False - - - 8 - 8 - 12 - 12 - 12 - - - True - 0.0 - Wired - end - - - - - center - - - Turn device off - - - - - - center - True - - - - - emblem-system-symbolic - 1 - - - - Options… - - - + + device_off_switch + Wired + + + center + + + Turn device off + + + + + + center + True + emblem-system-symbolic + + + Options… + +