Skip to content

feature-tile: Remove subtitle length restriction

Will Thompson requested to merge wjt/carousel-no-truncate into main

There is plenty of room in this banner, and I found many examples of descriptions being needlessly ellipsised.

I split this change out of the text tweaks on !874 (closed). @bertob asked:

What does it look like with very long descriptions? The truncation may have been deliberate to avoid long descriptions breaking the layout visually.

It is quite hard to find very long descriptions so I applied this patch to make all descriptions 5 times longer and much more enthusiastic:

diff --git a/src/gs-feature-tile.c b/src/gs-feature-tile.c
index 1c85083e..bdf8ce3d 100644
--- a/src/gs-feature-tile.c
+++ b/src/gs-feature-tile.c
@@ -223,7 +223,7 @@ gs_feature_tile_refresh (GsAppTile *self)
 
        /* Update text and let it wrap if the widget is narrow. */
        gtk_label_set_label (GTK_LABEL (tile->title), gs_app_get_name (app));
-       gtk_label_set_label (GTK_LABEL (tile->subtitle), gs_app_get_summary (app));
+       gtk_label_set_label (GTK_LABEL (tile->subtitle), g_strdup_printf ("%1$s! %1$s? %1$s‽ %1$s‼ %1$s‼‼", gs_app_get_summary (app)));
 
        gtk_label_set_line_wrap (GTK_LABEL (tile->subtitle), tile->narrow_mode);
        gtk_label_set_lines (GTK_LABEL (tile->subtitle), tile->narrow_mode ? 2 : 1);

Here are the results, maximized on 1600×900 and shrunk to nearly minimum width:

Screenshot_from_2021-08-16_21-30-53

Screenshot_from_2021-08-16_21-31-08

Edited by Will Thompson

Merge request reports