From 1fb4c47e6dba13f56537727e3550998cedaa3aa7 Mon Sep 17 00:00:00 2001 From: monsta Date: Thu, 26 Nov 2015 18:34:19 +0300 Subject: disks: set fixed width on columns --- src/disks.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/disks.cpp b/src/disks.cpp index 3c965f1..4ad345e 100644 --- a/src/disks.cpp +++ b/src/disks.cpp @@ -354,6 +354,7 @@ create_disk_view(ProcData *procdata) gtk_tree_view_column_set_reorderable(col, TRUE); gtk_tree_view_column_set_resizable(col, TRUE); gtk_tree_view_column_set_min_width (col, 30); + gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_append_column(GTK_TREE_VIEW(disk_tree), col); /* sizes - used */ @@ -363,9 +364,10 @@ create_disk_view(ProcData *procdata) col = gtk_tree_view_column_new(); gtk_tree_view_column_pack_start(col, cell, TRUE); gtk_tree_view_column_set_title(col, _(titles[i])); - gtk_tree_view_column_set_resizable(col, TRUE); gtk_tree_view_column_set_sort_column_id(col, i); + gtk_tree_view_column_set_resizable(col, TRUE); gtk_tree_view_column_set_reorderable(col, TRUE); + gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_append_column(GTK_TREE_VIEW(disk_tree), col); switch (i) { @@ -397,16 +399,17 @@ create_disk_view(ProcData *procdata) &procman::size_cell_data_func, GUINT_TO_POINTER(DISK_USED), NULL); - gtk_tree_view_column_set_title(col, _(titles[DISK_USED])); cell = gtk_cell_renderer_progress_new(); gtk_tree_view_column_pack_start(col, cell, TRUE); gtk_tree_view_column_set_attributes(col, cell, "value", DISK_USED_PERCENTAGE, NULL); - gtk_tree_view_append_column(GTK_TREE_VIEW(disk_tree), col); - gtk_tree_view_column_set_resizable(col, TRUE); + gtk_tree_view_column_set_title(col, _(titles[DISK_USED])); gtk_tree_view_column_set_sort_column_id(col, DISK_USED); + gtk_tree_view_column_set_resizable(col, TRUE); gtk_tree_view_column_set_reorderable(col, TRUE); + gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_FIXED); + gtk_tree_view_append_column(GTK_TREE_VIEW(disk_tree), col); /* numeric sort */ -- cgit v1.2.1