window: replace sidebar with overlay sidebar
When collapsed, there is no navigation required nor wanted. Instead, this allows to have an intermediate breakpoint at which the sidebar is still used, but overlaid instead of shown side-by-side. Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it> Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/542>
This commit is contained in:
committed by
Marge Bot
parent
26db7e1627
commit
07a6a077cb
+24
-17
@@ -129,7 +129,9 @@
|
|||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
<property name="child">
|
<property name="child">
|
||||||
<object class="AdwNavigationSplitView" id="split_view">
|
<object class="AdwOverlaySplitView" id="split_view">
|
||||||
|
<property name="pin-sidebar">True</property>
|
||||||
|
<property name="show-sidebar">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkDropTarget" id="drop_target">
|
<object class="GtkDropTarget" id="drop_target">
|
||||||
<property name="actions">copy</property>
|
<property name="actions">copy</property>
|
||||||
@@ -143,9 +145,6 @@
|
|||||||
</style>
|
</style>
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<property name="sidebar">
|
<property name="sidebar">
|
||||||
<object class="AdwNavigationPage">
|
|
||||||
<property name="title" translatable="yes">Calendar</property>
|
|
||||||
<property name="child">
|
|
||||||
<object class="AdwToolbarView">
|
<object class="AdwToolbarView">
|
||||||
<child type="top">
|
<child type="top">
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
@@ -216,18 +215,9 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
</object>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<!-- Main content -->
|
<!-- Main content -->
|
||||||
<property name="content">
|
<property name="content">
|
||||||
<object class="AdwNavigationPage" id="content_page">
|
|
||||||
<binding name="title">
|
|
||||||
<closure type="gchararray" function="content_title">
|
|
||||||
<lookup type="GcalWindow" name="active-view"/>
|
|
||||||
</closure>
|
|
||||||
</binding>
|
|
||||||
<property name="child">
|
|
||||||
<object class="AdwToolbarView">
|
<object class="AdwToolbarView">
|
||||||
<style>
|
<style>
|
||||||
<class name="view" />
|
<class name="view" />
|
||||||
@@ -235,7 +225,25 @@
|
|||||||
|
|
||||||
<child type="top">
|
<child type="top">
|
||||||
<object class="AdwHeaderBar" id="header_bar">
|
<object class="AdwHeaderBar" id="header_bar">
|
||||||
|
<child type="start">
|
||||||
|
<object class="GtkToggleButton" id="sidebar_button">
|
||||||
|
<property name="icon-name">sidebar-show-symbolic</property>
|
||||||
|
<property name="tooltip-text" translatable="yes">Toggle Sidebar</property>
|
||||||
|
<property name="active" bind-source="split_view" bind-property="show-sidebar" bind-flags="sync-create | bidirectional" />
|
||||||
<child>
|
<child>
|
||||||
|
<object class="GtkShortcutController">
|
||||||
|
<property name="scope">managed</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcut">
|
||||||
|
<property name="trigger">F9</property>
|
||||||
|
<property name="action">activate</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="start">
|
||||||
<object class="GtkButton">
|
<object class="GtkButton">
|
||||||
<property name="action-name">win.today</property>
|
<property name="action-name">win.today</property>
|
||||||
<property name="child">
|
<property name="child">
|
||||||
@@ -249,12 +257,12 @@
|
|||||||
</property>
|
</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child type="title">
|
<property name="title-widget">
|
||||||
<object class="AdwViewSwitcher" id="views_switcher">
|
<object class="AdwViewSwitcher" id="views_switcher">
|
||||||
<property name="stack">views_stack</property>
|
<property name="stack">views_stack</property>
|
||||||
<property name="policy">wide</property>
|
<property name="policy">wide</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</property>
|
||||||
<child type="end">
|
<child type="end">
|
||||||
<object class="GcalToolbarEnd" id="toolbar_end" />
|
<object class="GcalToolbarEnd" id="toolbar_end" />
|
||||||
</child>
|
</child>
|
||||||
@@ -309,8 +317,6 @@
|
|||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -319,6 +325,7 @@
|
|||||||
<object class="AdwBreakpoint">
|
<object class="AdwBreakpoint">
|
||||||
<condition>max-width: 700sp</condition>
|
<condition>max-width: 700sp</condition>
|
||||||
<setter object="split_view" property="collapsed">True</setter>
|
<setter object="split_view" property="collapsed">True</setter>
|
||||||
|
<setter object="split_view" property="show-sidebar">True</setter>
|
||||||
<setter object="action_bar" property="revealed">True</setter>
|
<setter object="action_bar" property="revealed">True</setter>
|
||||||
<!-- This needs to be set so that focus does not stay in the content pane when folding. -->
|
<!-- This needs to be set so that focus does not stay in the content pane when folding. -->
|
||||||
<setter object="content_page" property="sensitive">False</setter>
|
<setter object="content_page" property="sensitive">False</setter>
|
||||||
|
|||||||
Reference in New Issue
Block a user