From 8d203996a497c4f708817699d3f82343e162c0a8 Mon Sep 17 00:00:00 2001 From: ranfdev Date: Sat, 20 Jun 2020 12:07:16 +0200 Subject: [PATCH] Add responsive libhandy HdyViewSwitcherBar (#176) --- data/ui/dialogs/main.ui | 40 ++++++++++++++++++++++++++++--------- meson.build | 10 ++++++++++ src/Dialogs/MainWindow.vala | 2 +- 3 files changed, 42 insertions(+), 10 deletions(-) diff --git a/data/ui/dialogs/main.ui b/data/ui/dialogs/main.ui index 68f2f83..2777371 100644 --- a/data/ui/dialogs/main.ui +++ b/data/ui/dialogs/main.ui @@ -2,30 +2,50 @@ - + + diff --git a/meson.build b/meson.build index f26b752..d693198 100644 --- a/meson.build +++ b/meson.build @@ -10,6 +10,16 @@ add_global_arguments([ 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( 'as-resources', 'data/gresource.xml', source_dir: 'data', diff --git a/src/Dialogs/MainWindow.vala b/src/Dialogs/MainWindow.vala index eb590dd..b6b8483 100644 --- a/src/Dialogs/MainWindow.vala +++ b/src/Dialogs/MainWindow.vala @@ -18,7 +18,7 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow { [GtkChild] protected Button compose_button; [GtkChild] - protected Hdy.ViewSwitcher timeline_switcher; + protected Hdy.ViewSwitcherTitle timeline_switcher; [GtkChild] protected Widgets.AccountsButton accounts_button;