diff options
author | Jan-Michael Brummer <jan.brummer@tabos.org> | 2020-07-10 21:50:55 +0200 |
---|---|---|
committer | Jan-Michael Brummer <jan.brummer@tabos.org> | 2020-07-10 21:53:23 +0200 |
commit | 44a05555e4376b534819fda7b6eb4f1fce8c85cb (patch) | |
tree | eb61a944f981c53571d41370f9fdfe9640b15914 /src/ephy-action-bar.c | |
parent | f162f980dcce760f02164f04b265f4c85e0acda9 (diff) | |
download | epiphany-44a05555e4376b534819fda7b6eb4f1fce8c85cb.tar.gz |
Hide action bar in fullscreen narrow mode
Fixes: https://gitlab.gnome.org/GNOME/epiphany/-/issues/813
Diffstat (limited to 'src/ephy-action-bar.c')
-rw-r--r-- | src/ephy-action-bar.c | 23 |
1 files changed, 23 insertions, 0 deletions
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 @@ -103,6 +103,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) { EphyActionBar *action_bar = EPHY_ACTION_BAR (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 * |