[epiphany] Move favicon back to the left of tab label for expanded tabs
- From: Jan-Michael Brummer <jbrummer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Move favicon back to the left of tab label for expanded tabs
- Date: Sun, 7 Apr 2019 20:00:38 +0000 (UTC)
commit 828dd3f98b6254d494b19ec38edd1fb9585960e2
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Sun Apr 7 11:01:46 2019 +0200
Move favicon back to the left of tab label for expanded tabs
Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/715
src/ephy-tab-label.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/ephy-tab-label.c b/src/ephy-tab-label.c
index bbc11f429..1bca0ed11 100644
--- a/src/ephy-tab-label.c
+++ b/src/ephy-tab-label.c
@@ -21,6 +21,7 @@
#include "config.h"
#include "ephy-embed.h"
+#include "ephy-settings.h"
#include "ephy-tab-label.h"
#define TAB_WIDTH_N_CHARS 15
@@ -144,9 +145,12 @@ style_updated_cb (GtkWidget *widget,
GtkStyleContext *style;
PangoFontDescription *font_desc;
EphyTabLabel *self = EPHY_TAB_LABEL (widget);
+ gboolean expanded;
int char_width, h, w;
if (self->pinned) {
+ gtk_widget_set_hexpand (self->icon, FALSE);
+ gtk_widget_set_halign (self->icon, GTK_ALIGN_FILL);
gtk_widget_set_size_request (widget, -1, -1);
return;
}
@@ -164,6 +168,10 @@ style_updated_cb (GtkWidget *widget,
gtk_widget_set_size_request (widget, TAB_WIDTH_N_CHARS * PANGO_PIXELS (char_width) + 2 * w, -1);
gtk_widget_set_size_request (self->close_button, w + 2, h + 2);
+
+ expanded = g_settings_get_boolean (EPHY_SETTINGS_UI, EPHY_PREFS_UI_EXPAND_TABS_BAR);
+ gtk_widget_set_hexpand (self->icon, expanded);
+ gtk_widget_set_halign (self->icon, expanded ? GTK_ALIGN_END : GTK_ALIGN_FILL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]