gnome-control-center/panels/universal-access/cc-ua-panel.ui
Markus Göllnitz 98f7a40d24 multiple panels: show start title buttons in header bar
The start title buttons of the main window should be displayed if and
only if the end title buttons are. Only the left-most header bar should have
the start title button set and only right-most header bar the end title buttons.

Therefore, the title buttons property should be bound to the leaflet state:
When unfolded the start title buttons of the sidebar's header bar are
the only ones visible then, and not a second pair in the panel's header bar.
Likewise, in a folded state of the leaflet, the panel's header bar displays
all availble title buttons – start and end – as the panel is the only widget
displaying a header bar.

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
2023-03-16 13:18:37 +00:00

167 lines
6.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="CcUaPanel" parent="CcPanel">
<signal name="notify::folded" handler="ua_panel_update_back_button_cb" swapped="yes"/>
<!-- Header Bar -->
<child type="titlebar">
<object class="AdwHeaderBar" id="titlebar">
<property name="show-end-title-buttons">True</property>
<property name="show-start-title-buttons" bind-source="CcUaPanel" bind-property="folded" bind-flags="default|sync-create" />
<property name="title-widget">
<object class="AdwWindowTitle" id="page_title"/>
</property>
<child type="start">
<object class="GtkButton" id="back_button">
<property name="visible">False</property>
<property name="icon-name">go-previous-symbolic</property>
<accessibility>
<property name="label" translatable="yes">Back</property>
</accessibility>
<signal name="clicked" handler="ua_panel_back_clicked_cb" swapped="yes"/>
</object>
</child>
</object>
</child>
<child type="content">
<object class="AdwLeaflet" id="main_leaflet">
<property name="can-unfold">False</property>
<property name="can-navigate-back">True</property>
<signal name="notify::visible-child" handler="ua_panel_update_back_button_cb" swapped="yes"/>
<signal name="notify::visible-child" handler="ua_panel_visible_child_changed_cb" swapped="yes"/>
<child>
<object class="AdwPreferencesPage" id="main_page">
<!-- Accessibility menu row -->
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="CcListRow" id="show_ua_menu_row">
<property name="title" translatable="yes">_Accessibility Menu</property>
<property name="subtitle" translatable="yes">Display menu for Accessibility settings in top bar</property>
<property name="use-underline">True</property>
<property name="show-switch">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="GtkListBox">
<property name="selection-mode">none</property>
<signal name="row-activated" handler="ua_panel_row_activated_cb" swapped="yes"/>
<style>
<class name="boxed-list"/>
</style>
<!-- Seeing row -->
<child>
<object class="CcListRow" id="seeing_row">
<property name="title" translatable="yes">_Seeing</property>
<property name="icon-name">seeing-symbolic</property>
<property name="use-underline">True</property>
<property name="show-arrow">True</property>
</object>
</child>
<!-- Hearing row -->
<child>
<object class="CcListRow" id="hearing_row">
<property name="title" translatable="yes">_Hearing</property>
<property name="icon-name">hearing-symbolic</property>
<property name="use-underline">True</property>
<property name="show-arrow">True</property>
</object>
</child>
<!-- Typing row -->
<child>
<object class="CcListRow" id="typing_row">
<property name="title" translatable="yes">_Typing</property>
<property name="icon-name">typing-symbolic</property>
<property name="use-underline">True</property>
<property name="show-arrow">True</property>
</object>
</child>
<!-- Mouse and clicking row -->
<child>
<object class="CcListRow" id="mouse_row">
<property name="title" translatable="yes">_Pointing and Clicking</property>
<property name="icon-name">pointing-symbolic</property>
<property name="use-underline">True</property>
<property name="show-arrow">True</property>
</object>
</child>
<!-- Zoom row -->
<child>
<object class="CcListRow" id="zoom_row">
<property name="title" translatable="yes">_Zoom</property>
<property name="icon-name">zoom-symbolic</property>
<property name="use-underline">True</property>
<property name="show-arrow">True</property>
</object>
</child>
</object>
</child>
</object> <!-- ./AdwPreferencesGroup -->
</child>
</object> <!-- ./AdwPreferencesPage main_page -->
</child>
<child>
<object class="AdwLeafletPage">
<property name="navigatable">False</property>
<property name="child">
<object class="CcUaSeeingPage" id="seeing_page"/>
</property>
</object>
</child>
<child>
<object class="AdwLeafletPage">
<property name="navigatable">False</property>
<property name="child">
<object class="CcUaHearingPage" id="hearing_page"/>
</property>
</object>
</child>
<child>
<object class="AdwLeafletPage">
<property name="navigatable">False</property>
<property name="child">
<object class="CcUaTypingPage" id="typing_page"/>
</property>
</object>
</child>
<child>
<object class="AdwLeafletPage">
<property name="navigatable">False</property>
<property name="child">
<object class="CcUaMousePage" id="mouse_page"/>
</property>
</object>
</child>
<child>
<object class="AdwLeafletPage">
<property name="navigatable">False</property>
<property name="child">
<object class="CcUaZoomPage" id="zoom_page"/>
</property>
</object>
</child>
</object>
</child>
</template>
</interface>