[epiphany] Hide new tab button in narrow mode
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Hide new tab button in narrow mode
- Date: Mon, 20 Apr 2020 15:45:57 +0000 (UTC)
commit ce3fe7927655a10f0751e33151fad5e096206fb2
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Sun Mar 15 11:36:18 2020 +0100
Hide new tab button in narrow mode
As the new tab button is also part of the pages menu we can remove it in
the action bar to remove the clutter.
src/ephy-action-bar-start.c | 7 +++++++
src/ephy-action-bar-start.h | 5 +++++
src/ephy-action-bar.c | 2 ++
3 files changed, 14 insertions(+)
---
diff --git a/src/ephy-action-bar-start.c b/src/ephy-action-bar-start.c
index eb0821e09..e453c3de9 100644
--- a/src/ephy-action-bar-start.c
+++ b/src/ephy-action-bar-start.c
@@ -643,3 +643,10 @@ ephy_action_bar_start_get_placeholder (EphyActionBarStart *action_bar_start)
{
return action_bar_start->placeholder;
}
+
+void
+ephy_action_bar_start_set_adaptive_mode (EphyActionBarStart *action_bar,
+ EphyAdaptiveMode adaptive_mode)
+{
+ gtk_widget_set_visible (action_bar->new_tab_button, adaptive_mode == EPHY_ADAPTIVE_MODE_NORMAL);
+}
diff --git a/src/ephy-action-bar-start.h b/src/ephy-action-bar-start.h
index cf3ae9bc0..1a4c106a9 100644
--- a/src/ephy-action-bar-start.h
+++ b/src/ephy-action-bar-start.h
@@ -23,6 +23,8 @@
#include <gtk/gtk.h>
+#include "ephy-adaptive-mode.h"
+
G_BEGIN_DECLS
#define EPHY_TYPE_ACTION_BAR_START (ephy_action_bar_start_get_type ())
@@ -37,4 +39,7 @@ void ephy_action_bar_set_is_fullscreen (Eph
gboolean fullscreen);
GtkWidget *ephy_action_bar_start_get_placeholder (EphyActionBarStart
*action_bar_start);
+void ephy_action_bar_start_set_adaptive_mode (EphyActionBarStart *action_bar,
+ EphyAdaptiveMode
adaptive_mode);
+
G_END_DECLS
diff --git a/src/ephy-action-bar.c b/src/ephy-action-bar.c
index c7651535c..47fcd60a0 100644
--- a/src/ephy-action-bar.c
+++ b/src/ephy-action-bar.c
@@ -209,4 +209,6 @@ ephy_action_bar_set_adaptive_mode (EphyActionBar *action_bar,
break;
}
+
+ ephy_action_bar_start_set_adaptive_mode (action_bar->action_bar_start, adaptive_mode);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]