From 886acdb8c2b08dc771aa5799a14cd4d0c23619b6 Mon Sep 17 00:00:00 2001 From: Nico Alt <nicoalt@posteo.org> Date: Tue, 4 Feb 2020 12:00:02 +0000 Subject: [PATCH] Add libhandy to adapt to smaller screens Developed by Purism at https://source.puri.sm/Librem5/libhandy Documentation at https://honk.sigxcpu.org/projects/libhandy/doc/ --- app.briar.gtk.json | 19 +++++++++++++++++++ briar-gtk/briar_gtk/application.py | 4 +++- meson.build | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/app.briar.gtk.json b/app.briar.gtk.json index f5d9202..e98f760 100644 --- a/app.briar.gtk.json +++ b/app.briar.gtk.json @@ -80,6 +80,25 @@ } ] }, + { + "name" : "libhandy", + "buildsystem" : "meson", + "config-opts": [ + "-Dtests=false", + "-Dexamples=false", + "-Dgtk_doc=false", + "-Dvapi=false", + "-Dglade_catalog=disabled" + ], + "sources" : [ + { + "type" : "git", + "tag" : "v0.0.13", + "url" : "https://source.puri.sm/Librem5/libhandy.git" + } + ] + }, + { "name": "briar-headless", "buildsystem": "simple", diff --git a/briar-gtk/briar_gtk/application.py b/briar-gtk/briar_gtk/application.py index 84dbc92..39e80ec 100644 --- a/briar-gtk/briar_gtk/application.py +++ b/briar-gtk/briar_gtk/application.py @@ -9,7 +9,8 @@ import gi gi.require_version('Gdk', '3.0') gi.require_version('Gtk', '3.0') -from gi.repository import Gdk, Gio, GLib, Gtk +gi.require_version('Handy', '0.0') +from gi.repository import Gdk, Gio, GLib, Gtk, Handy from briar_wrapper.api import Api @@ -30,6 +31,7 @@ class Application(Gtk.Application, ApplicationActions): def do_startup(self): Gtk.Application.do_startup(self) Application._setup_styling(APPLICATION_STYLING_PATH) + Handy.init() self._setup_api() # pylint: disable=arguments-differ diff --git a/meson.build b/meson.build index b85ce42..cf282c9 100644 --- a/meson.build +++ b/meson.build @@ -10,4 +10,5 @@ project( i18n = import('i18n') +dependency('libhandy-0.0') subdir('briar-gtk') -- GitLab