[epiphany] Hide action bar in fullscreen narrow mode
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Hide action bar in fullscreen narrow mode
- Date: Fri, 10 Jul 2020 20:54:52 +0000 (UTC)
commit 44a05555e4376b534819fda7b6eb4f1fce8c85cb
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Fri Jul 10 21:50:55 2020 +0200
Hide action bar in fullscreen narrow mode
Fixes: https://gitlab.gnome.org/GNOME/epiphany/-/issues/813
meson.build | 2 +-
src/ephy-action-bar.c | 23 +++++++++++++++++++++++
2 files changed, 24 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 4c9b8d353..ca7c2d78d 100644
--- a/meson.build
+++ b/meson.build
@@ -91,7 +91,7 @@ gtk_unix_print_dep = dependency('gtk+-unix-print-3.0', version: gtk_requirement)
hogweed_dep = dependency('hogweed', version: nettle_requirement)
iso_codes_dep = dependency('iso-codes', version: '>= 0.35')
json_glib_dep = dependency('json-glib-1.0', version: '>= 1.2.4')
-libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.35.3')
+libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.37.1')
libhandy_dep = dependency('libhandy-1', version: '>= 0.83.0')
libsecret_dep = dependency('libsecret-1', version: '>= 0.19.0')
libsoup_dep = dependency('libsoup-2.4', version: '>= 2.48.0')
diff --git a/src/ephy-action-bar.c b/src/ephy-action-bar.c
index 396c97bd0..80a29b3bf 100644
--- a/src/ephy-action-bar.c
+++ b/src/ephy-action-bar.c
@@ -102,6 +102,25 @@ ephy_action_bar_get_property (GObject *object,
}
}
+static void
+titlebar_animation_changed (EphyActionBar *action_bar)
+{
+ switch (dzl_application_window_get_titlebar_animation (DZL_APPLICATION_WINDOW (action_bar->window))) {
+ case DZL_TITLEBAR_ANIMATION_SHOWN:
+ gtk_widget_set_visible (GTK_WIDGET (action_bar), TRUE);
+ break;
+ case DZL_TITLEBAR_ANIMATION_SHOWING:
+ gtk_revealer_set_reveal_child (GTK_REVEALER (action_bar), TRUE);
+ break;
+ case DZL_TITLEBAR_ANIMATION_HIDING:
+ gtk_revealer_set_reveal_child (GTK_REVEALER (action_bar), FALSE);
+ break;
+ case DZL_TITLEBAR_ANIMATION_HIDDEN:
+ gtk_widget_set_visible (GTK_WIDGET (action_bar), FALSE);
+ break;
+ }
+}
+
static void
ephy_action_bar_constructed (GObject *object)
{
@@ -121,6 +140,9 @@ ephy_action_bar_constructed (GObject *object)
g_signal_connect_object (action_bar->notebook, "page-removed",
G_CALLBACK (update_pages_button), action_bar,
G_CONNECT_SWAPPED);
+ g_signal_connect_object (DZL_APPLICATION_WINDOW (action_bar->window), "notify::titlebar-animation",
+ G_CALLBACK (titlebar_animation_changed), action_bar,
+ G_CONNECT_SWAPPED);
}
static void
@@ -176,6 +198,7 @@ ephy_action_bar_init (EphyActionBar *action_bar)
ephy_action_bar_start_set_adaptive_mode (action_bar->action_bar_start,
EPHY_ADAPTIVE_MODE_NARROW);
+ titlebar_animation_changed (action_bar);
}
EphyActionBar *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]