logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: ebfa85f2cfbd3770fae4f83d7457dcfb001b5fd1
parent: 3ae5614e9e8b5ad5f346a6ea43a2fd514e55f318
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue, 12 Mar 2019 08:37:52 +0100

fixup: Add configuration of tab label (ellipsis, size)

Diffstat:

Mbadwolf.c4++--
Mconfig.h1+
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -113,8 +113,8 @@ GtkWidget *badwolf_new_tab_box(const gchar *title, struct Client *browser) GtkWidget *playing = gtk_image_new_from_icon_name("media-playback-start-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR); - gtk_label_set_width_chars(GTK_LABEL(label), BADWOLF_TAB_LABEL_CHARWIDTH); // 26 - gtk_label_set_ellipsize(GTK_LABEL(label), BADWOLF_TAB_LABEL_ELLIPSIZE); // PANGO_ELLIPSIZE_MIDDLE + gtk_label_set_width_chars(GTK_LABEL(label), BADWOLF_TAB_LABEL_CHARWIDTH); + gtk_label_set_ellipsize(GTK_LABEL(label), BADWOLF_TAB_LABEL_ELLIPSIZE); gtk_label_set_single_line_mode(GTK_LABEL(label), TRUE); gtk_box_pack_start(GTK_BOX(tab_box), playing, FALSE, FALSE, 0); diff --git a/config.h b/config.h @@ -19,6 +19,7 @@ * * See https://developer.gnome.org/pango/stable/pango-Layout-Objects.html#PangoEllipsizeMode */ +#define BADWOLF_TAB_LABEL_ELLIPSIZE PANGO_ELLIPSIZE_MIDDLE // BADWOLF_BOX_PADDING: Amount of padding between browser’s box (tab child) elements #define BADWOLF_BOX_PADDING 0