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.
This commit is contained in:
parent
dd1817f5b8
commit
2a838f8684
2 changed files with 16 additions and 17 deletions
|
@ -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));
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue