Add responsive libhandy HdyViewSwitcherBar (#176)
This commit is contained in:
parent
7e97ca1c54
commit
8d203996a4
|
@ -2,30 +2,50 @@
|
||||||
<!-- Generated with glade 3.36.0 -->
|
<!-- Generated with glade 3.36.0 -->
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.20"/>
|
<requires lib="gtk+" version="3.20"/>
|
||||||
<requires lib="libhandy" version="0.0"/>
|
<requires lib="libhandy" version="1.0"/>
|
||||||
<template class="TootleDialogsMainWindow" parent="GtkWindow">
|
<template class="TootleDialogsMainWindow" parent="GtkWindow">
|
||||||
<property name="width_request">450</property>
|
<property name="width_request">450</property>
|
||||||
<property name="height_request">600</property>
|
<property name="height_request">600</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkStack" id="view_stack">
|
<object class="GtkBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="transition_type">slide-left-right</property>
|
<property name="spacing">5</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkStack" id="timeline_stack">
|
<object class="GtkStack" id="view_stack">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="transition_type">slide-left-right</property>
|
<property name="transition_type">slide-left-right</property>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<object class="GtkStack" id="timeline_stack">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="transition_type">slide-left-right</property>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">0</property>
|
||||||
|
<property name="title" translatable="yes">0</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="name">0</property>
|
<property name="expand">True</property>
|
||||||
<property name="title" translatable="yes">0</property>
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="HdyViewSwitcherBar" id="switcher_navbar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stack">timeline_stack</property>
|
||||||
|
<property name="reveal" bind-source="timeline_switcher" bind-property="title_visible" bind-flags="sync-create"></property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
|
@ -34,8 +54,9 @@
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="show_close_button">True</property>
|
<property name="show_close_button">True</property>
|
||||||
<child type="title">
|
<child type="title">
|
||||||
<object class="HdyViewSwitcher" id="timeline_switcher">
|
<object class="HdyViewSwitcherTitle" id="timeline_switcher">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="title">Tootle</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -81,3 +102,4 @@
|
||||||
</child>
|
</child>
|
||||||
</template>
|
</template>
|
||||||
</interface>
|
</interface>
|
||||||
|
|
||||||
|
|
10
meson.build
10
meson.build
|
@ -10,6 +10,16 @@ add_global_arguments([
|
||||||
language: 'c',
|
language: 'c',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# This is needed to make libhandy 1.0 work with vala.
|
||||||
|
# Without this, vala will complain:
|
||||||
|
# "X is not available in libhandy-1 0.81.0. Use libhandy-1 >= 1.0"
|
||||||
|
# FIXME Disable --disable-since-check after libhandy 1.0 is released
|
||||||
|
add_project_arguments (
|
||||||
|
'--disable-since-check',
|
||||||
|
language: 'vala'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
asresources = gnome.compile_resources(
|
asresources = gnome.compile_resources(
|
||||||
'as-resources', 'data/gresource.xml',
|
'as-resources', 'data/gresource.xml',
|
||||||
source_dir: 'data',
|
source_dir: 'data',
|
||||||
|
|
|
@ -18,7 +18,7 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow {
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
protected Button compose_button;
|
protected Button compose_button;
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
protected Hdy.ViewSwitcher timeline_switcher;
|
protected Hdy.ViewSwitcherTitle timeline_switcher;
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
protected Widgets.AccountsButton accounts_button;
|
protected Widgets.AccountsButton accounts_button;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue