main-window: Use HdyViewSwitcherTitle

This makes the code simpler.
This commit is contained in:
Adrien Plazas
2020-09-29 12:43:22 +02:00
committed by Julian Sparber
parent 6dba2c453b
commit 576ea55e9f
2 changed files with 10 additions and 70 deletions

View File

@@ -66,7 +66,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stack">main_stack</property>
<property name="reveal">True</property>
<property name="reveal" bind-source="title_switcher" bind-property="title-visible" bind-flags="sync-create"/>
</object>
</child>
</object>
@@ -79,39 +79,13 @@
<property name="centering_policy">strict</property>
<property name="can_focus">False</property>
<property name="show_close_button">True</property>
<property name="title">Calls</property>
<property name="title" bind-source="CallsMainWindow" bind-property="title" bind-flags="sync-create"/>
<child type="title">
<object class="HdySqueezer" id="squeezer">
<object class="HdyViewSwitcherTitle" id="title_switcher">
<property name="visible">True</property>
<property name="transition-type">crossfade</property>
<child>
<object class="HdyViewSwitcher" id="wide_switcher">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="policy">wide</property>
<property name="stack">main_stack</property>
</object>
</child>
<child>
<object class="HdyViewSwitcher" id="narrow_switcher">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="policy">narrow</property>
<property name="stack">main_stack</property>
</object>
</child>
<child>
<object class="GtkLabel" id="title_label">
<property name="visible">True</property>
<property name="halign">center</property>
<property name="label">Calls</property>
<style>
<class name="title"/>
</style>
</object>
</child>
<property name="can_focus">False</property>
<property name="stack">main_stack</property>
<property name="title" bind-source="CallsMainWindow" bind-property="title" bind-flags="sync-create"/>
</object>
</child>
</object>