Files
federated-calendar/src/gui/gcal-calendar-navigation-button.ui
T
Markus Göllnitz 7904aba23c gui: introduce navigation button with date chooser
The navigation button provides access to a date chooser
at all times without requiring it to be permanently
visible, as done currently with the always-shown sidebar.

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/542>
2025-06-08 09:59:00 +00:00

56 lines
2.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalCalendarNavigationButton" parent="AdwBin">
<property name="child">
<object class="GtkStack" id="stack">
<property name="hhomogeneous">False</property>
<child>
<object class="GtkStackPage">
<property name="name">active</property>
<property name="child">
<object class="GtkMenuButton" id="button">
<property name="popover">popover_date_chooser</property>
<property name="label" translatable="yes">_Choose Date</property>
<property name="use-underline">True</property>
<property name="can-shrink">True</property>
<property name="tooltip-text" translatable="yes">Choose a Date</property>
<property name="always-show-arrow">True</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">inactive</property>
<property name="child">
<object class="GtkLabel" id="static_label">
<style>
<class name="heading" />
</style>
<property name="label" bind-source="button" bind-property="label" />
<property name="margin-start">9</property>
<property name="margin-end">9</property>
</object>
</property>
</object>
</child>
<property name="visible-child-name">active</property>
</object>
</property>
</template>
<object class="GtkPopover" id="popover_date_chooser">
<property name="position">bottom</property>
<property name="child">
<object class="GcalDateChooser">
<property name="split-month-year">True</property>
<property name="vexpand">False</property>
<property name="valign">end</property>
<property name="active-date" bind-source="GcalCalendarNavigationButton" bind-property="active-date" bind-flags="bidirectional" />
</object>
</property>
</object>
</interface>