diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2022-01-06 13:43:04 -0300 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2022-01-18 17:03:14 +0000 |
commit | 2a838f86845ca4fffd99b7c84c850557db72b805 (patch) | |
tree | 54971a359313958644b65a70b6482ea36ee0c6ff | |
parent | dd1817f5b8481402539699a82a861af1798af41a (diff) | |
download | gnome-control-center-2a838f86845ca4fffd99b7c84c850557db72b805.tar.gz |
display: Move primary display row to display type group
As per mockup. Over the next commits, more parts of the
display panel will be moved to this group.
-rw-r--r-- | panels/display/cc-display-panel.c | 7 | ||||
-rw-r--r-- | panels/display/cc-display-panel.ui | 26 |
2 files changed, 16 insertions, 17 deletions
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c index 4f082aaa0..acc1cc7e8 100644 --- a/panels/display/cc-display-panel.c +++ b/panels/display/cc-display-panel.c @@ -95,6 +95,7 @@ struct _CcDisplayPanel GtkToggleButton *config_type_mirror; GtkToggleButton *config_type_single; GtkWidget *config_type_switcher_group; + GtkWidget *config_type_switcher_row; GtkLabel *current_output_label; AdwBin *display_settings_bin; GtkBox *multi_selection_box; @@ -715,6 +716,7 @@ cc_display_panel_class_init (CcDisplayPanelClass *klass) gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, arrangement_group); gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, arrangement_bin); gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, config_type_switcher_group); + gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, config_type_switcher_row); gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, config_type_join); gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, config_type_mirror); gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, config_type_single); @@ -893,6 +895,7 @@ rebuild_ui (CcDisplayPanel *panel) type = CC_DISPLAY_CONFIG_JOIN; gtk_widget_set_visible (panel->config_type_switcher_group, TRUE); + gtk_widget_set_visible (panel->config_type_switcher_row, TRUE); gtk_widget_set_visible (panel->arrangement_group, type == CC_DISPLAY_CONFIG_JOIN); /* We need a switcher except in CLONE mode */ @@ -906,7 +909,8 @@ rebuild_ui (CcDisplayPanel *panel) /* We have more than one usable monitor. In this case there is no chooser, * and we always show the arrangement widget even if we are in SINGLE mode. */ - gtk_widget_set_visible (panel->config_type_switcher_group, FALSE); + gtk_widget_set_visible (panel->config_type_switcher_group, TRUE); + gtk_widget_set_visible (panel->config_type_switcher_row, FALSE); gtk_widget_set_visible (panel->arrangement_group, TRUE); /* Mirror is also invalid as it cannot be configured using this UI. */ @@ -923,6 +927,7 @@ rebuild_ui (CcDisplayPanel *panel) type = CC_DISPLAY_CONFIG_SINGLE; gtk_widget_set_visible (panel->config_type_switcher_group, FALSE); + gtk_widget_set_visible (panel->config_type_switcher_row, FALSE); gtk_widget_set_visible (panel->arrangement_group, FALSE); gtk_stack_set_visible_child (panel->output_selection_stack, GTK_WIDGET (panel->current_output_label)); diff --git a/panels/display/cc-display-panel.ui b/panels/display/cc-display-panel.ui index 2bcceb235..dcffbfc50 100644 --- a/panels/display/cc-display-panel.ui +++ b/panels/display/cc-display-panel.ui @@ -83,7 +83,17 @@ </child> </object> </child> + + <!-- Primary Display --> + <child> + <object class="AdwComboRow" id="primary_display_row"> + <property name="subtitle" translatable="yes">Contains top bar and Activities</property> + <property name="title" translatable="yes">Primary Display</property> + <signal name="notify::selected-index" handler="on_primary_display_selected_index_changed_cb" swapped="yes"/> + </object> + </child> </object> + </child> <child> <object class="AdwPreferencesGroup" id="arrangement_group"> @@ -101,22 +111,6 @@ </style> </object> </child> - <child> - <object class="GtkFrame"> - <child> - <object class="GtkListBox"> - <property name="selection_mode">none</property> - <child> - <object class="AdwComboRow" id="primary_display_row"> - <property name="subtitle" translatable="yes">Contains top bar and Activities</property> - <property name="title" translatable="yes">Primary Display</property> - <signal name="notify::selected-index" handler="on_primary_display_selected_index_changed_cb" swapped="yes"/> - </object> - </child> - </object> - </child> - </object> - </child> </object> </child> <accessibility> |