diff --git a/panels/network/cc-wifi-panel.c b/panels/network/cc-wifi-panel.c index 67d491233e5573865560c91305fcf9348a7019a6..a83942d9e99a00ecfaad4eda39a1761a6588b3e4 100644 --- a/panels/network/cc-wifi-panel.c +++ b/panels/network/cc-wifi-panel.c @@ -55,6 +55,7 @@ struct _CcWifiPanel GtkStack *center_stack; GtkStack *device_stack; GtkBox *hotspot_box; + GtkButton *hotspot_off_button; GtkLabel *list_label; GtkStack *main_stack; GtkWidget *spinner; @@ -837,6 +838,7 @@ cc_wifi_panel_class_init (CcWifiPanelClass *klass) gtk_widget_class_bind_template_child (widget_class, CcWifiPanel, center_stack); gtk_widget_class_bind_template_child (widget_class, CcWifiPanel, device_stack); gtk_widget_class_bind_template_child (widget_class, CcWifiPanel, hotspot_box); + gtk_widget_class_bind_template_child (widget_class, CcWifiPanel, hotspot_off_button); gtk_widget_class_bind_template_child (widget_class, CcWifiPanel, list_label); gtk_widget_class_bind_template_child (widget_class, CcWifiPanel, main_stack); gtk_widget_class_bind_template_child (widget_class, CcWifiPanel, rfkill_row); @@ -857,6 +859,7 @@ static void cc_wifi_panel_init (CcWifiPanel *self) { g_autoptr(GtkCssProvider) provider = NULL; + GtkLabel *hotspot_off_label; g_resources_register (cc_network_get_resource ()); @@ -914,4 +917,9 @@ cc_wifi_panel_init (CcWifiPanel *self) gtk_style_context_add_provider_for_display (gdk_display_get_default (), GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + + /* Customize some properties that would lose styling if done in UI */ + hotspot_off_label = GTK_LABEL (gtk_button_get_child (self->hotspot_off_button)); + gtk_label_set_wrap (hotspot_off_label, TRUE); + gtk_label_set_justify (hotspot_off_label, GTK_JUSTIFY_CENTER); } diff --git a/panels/network/cc-wifi-panel.ui b/panels/network/cc-wifi-panel.ui index 7fabf105624946070b1c70003fe68bfd600b6148..dd5f7916b94ce3199110244b3f8b881e26dc8fe2 100644 --- a/panels/network/cc-wifi-panel.ui +++ b/panels/network/cc-wifi-panel.ui @@ -134,6 +134,9 @@ Wi-Fi Hotspot Active 12 + center + True + word-char