[nautilus/wip/antoniof/fix-trash-bar-label] trash-bar: Ellipsize subtitle label
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/fix-trash-bar-label] trash-bar: Ellipsize subtitle label
- Date: Wed, 27 Oct 2021 12:21:17 +0000 (UTC)
commit 01690154f72e79428d6a727b08898879fc2825a9
Author: António Fernandes <antoniof gnome org>
Date: Wed Oct 27 13:07:27 2021 +0100
trash-bar: Ellipsize subtitle label
The subtitle label is long and may be even longer in some locales.
As a result, a wide minimum width is forced on the whole window, which
is not desirable.
So, make it ellipsize and also add a tooltip.
src/nautilus-trash-bar.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-trash-bar.c b/src/nautilus-trash-bar.c
index d458fa862..7fca03e67 100644
--- a/src/nautilus-trash-bar.c
+++ b/src/nautilus-trash-bar.c
@@ -212,6 +212,7 @@ static void
nautilus_trash_bar_init (NautilusTrashBar *bar)
{
GtkWidget *content_area, *action_area, *w;
+ const gchar *subtitle_text;
GtkWidget *label;
GtkWidget *subtitle;
PangoAttrList *attrs;
@@ -228,7 +229,10 @@ nautilus_trash_bar_init (NautilusTrashBar *bar)
gtk_label_set_attributes (GTK_LABEL (label), attrs);
pango_attr_list_unref (attrs);
- subtitle = gtk_label_new (_("Trashed items are automatically deleted after a period of time"));
+ subtitle_text = _("Trashed items are automatically deleted after a period of time");
+ subtitle = gtk_label_new (subtitle_text);
+ gtk_widget_set_tooltip_text (subtitle, subtitle_text);
+ gtk_label_set_ellipsize (GTK_LABEL (subtitle), PANGO_ELLIPSIZE_END);
g_settings_bind (gnome_privacy_preferences,
"remove-old-trash-files",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]