[epiphany] floating-bar: set a max-width to the label
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] floating-bar: set a max-width to the label
- Date: Wed, 14 Mar 2012 13:54:51 +0000 (UTC)
commit 67247db727a6fc1724de9c94c4030e9c02b250d5
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Mar 14 09:53:29 2012 -0400
floating-bar: set a max-width to the label
We don't want the floating bar to extend without boundaries in the
available size, since some hyperlinks can be very long (and make the bar
cover the whole screen).
https://bugzilla.gnome.org/show_bug.cgi?id=671520
lib/widgets/nautilus-floating-bar.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/lib/widgets/nautilus-floating-bar.c b/lib/widgets/nautilus-floating-bar.c
index e37a81a..066a27a 100644
--- a/lib/widgets/nautilus-floating-bar.c
+++ b/lib/widgets/nautilus-floating-bar.c
@@ -233,13 +233,14 @@ nautilus_floating_bar_constructed (GObject *obj)
gtk_widget_set_margin_left (w, 8);
w = gtk_label_new (NULL);
- gtk_label_set_ellipsize (GTK_LABEL (w), PANGO_ELLIPSIZE_END);
+ gtk_label_set_ellipsize (GTK_LABEL (w), PANGO_ELLIPSIZE_MIDDLE);
gtk_box_pack_start (GTK_BOX (box), w, FALSE, FALSE, 0);
g_object_set (w,
"margin-top", 2,
"margin-bottom", 2,
"margin-left", 12,
"margin-right", 12,
+ "max-width-chars", 60,
NULL);
self->priv->label_widget = w;
gtk_widget_show (w);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]