[nautilus/clear-starred-column-header: 1/2] list-view: Hide Star column title
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/clear-starred-column-header: 1/2] list-view: Hide Star column title
- Date: Sat, 13 Feb 2021 09:42:45 +0000 (UTC)
commit 39a57d2f698e4528aa2992519a5b2ac7ea442a8e
Author: António Fernandes <antoniof gnome org>
Date: Sat Feb 13 01:15:06 2021 +0000
list-view: Hide Star column title
While "Star" is 4 chars long in English, it's longer in other languages.
This means the column may become much wider than needed for displaying
a small star icon, which both looks bad and takes away space from other
columns.
Since this is a column of star symbols, we don't really need a title.
But setting an empty title makes the columns too narrow (16px), which
gets covered by the overlay scrollbar.
So, in addition to removing the title label, set a 48 fixed width for
the column, which provides enough gutter for the overlay scrollbar.
src/nautilus-list-view.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 97e3d19d8..d0793d5a6 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -69,6 +69,10 @@ struct SelectionForeachData
*/
#define LIST_VIEW_MINIMUM_ROW_HEIGHT 28
+/* The star icon itself is 16px, which leaves an empty 16px gutter on each side,
+ * which is necessary to avoid the overlay scrollbar.
+#define STAR_COLUMN_WIDTH 48
+
/* We wait two seconds after row is collapsed to unload the subdirectory */
#define COLLAPSE_TO_UNLOAD_DELAY 2
@@ -2324,9 +2328,10 @@ create_and_set_up_tree_view (NautilusListView *view)
"mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE,
NULL);
- column = gtk_tree_view_column_new_with_attributes (label,
+ column = gtk_tree_view_column_new_with_attributes ("",
cell,
NULL);
+ gtk_tree_view_column_set_fixed_width (column, STAR_COLUMN_WIDTH);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]