From 9ab4c15c7ae1b1160d9a1d8a5879a46a0e5cd0c5 Mon Sep 17 00:00:00 2001 From: monsta Date: Thu, 26 Nov 2015 17:50:34 +0300 Subject: process table: set correct minimum width for all columns --- src/procman.cpp | 2 +- src/proctable.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/procman.cpp b/src/procman.cpp index 2171670..0491df9 100644 --- a/src/procman.cpp +++ b/src/procman.cpp @@ -430,7 +430,7 @@ procman_get_tree_state (GSettings *settings, GtkWidget *tree, const gchar *child gtk_tree_view_column_set_visible (column, visible); if (visible) { /* ensure column is really visible */ - width = MAX(width, 10); + width = MAX(width, 20); gtk_tree_view_column_set_fixed_width(column, width); } } diff --git a/src/proctable.cpp b/src/proctable.cpp index 426cc0b..fb7a9ce 100644 --- a/src/proctable.cpp +++ b/src/proctable.cpp @@ -357,7 +357,7 @@ proctable_new (ProcData * const procdata) gtk_tree_view_column_set_sort_column_id (column, COL_NAME); gtk_tree_view_column_set_resizable (column, TRUE); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); - gtk_tree_view_column_set_min_width (column, 1); + gtk_tree_view_column_set_min_width (column, 20); g_signal_connect(G_OBJECT(column), "notify::fixed-width", G_CALLBACK(cb_proctable_column_resized), procdata->settings); gtk_tree_view_append_column (GTK_TREE_VIEW (proctree), column); gtk_tree_view_set_expander_column (GTK_TREE_VIEW (proctree), column); @@ -372,8 +372,9 @@ proctable_new (ProcData * const 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_sizing(col, GTK_TREE_VIEW_COLUMN_FIXED); g_signal_connect(G_OBJECT(col), "notify::fixed-width", G_CALLBACK(cb_proctable_column_resized), procdata->settings); gtk_tree_view_column_set_reorderable(col, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(proctree), col); @@ -452,7 +453,7 @@ proctable_new (ProcData * const procdata) break; } - // xaling + // xalign switch(i) { case COL_VMSIZE: @@ -472,11 +473,10 @@ proctable_new (ProcData * const procdata) // sizing switch (i) { case COL_ARGS: - gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_min_width(col, 150); break; default: - gtk_tree_view_column_set_min_width(column, 20); + gtk_tree_view_column_set_min_width(col, 20); break; } } -- cgit v1.2.1