Changed minumum sizes of some columns

pull/193/head
Ivan Dmitrievich Yartsev 10 months ago
parent e57acfb536
commit 3e14a498c7

@ -3138,21 +3138,27 @@ main_window *yon_main_window_complete(main_window *widgets){
yon_root_button_setup((template_main_window*)widgets,main_config.launch_arguments,main_config.launch_size); yon_root_button_setup((template_main_window*)widgets,main_config.launch_arguments,main_config.launch_size);
yon_gtk_tree_view_minimal_fixed_size_set_full(GTK_TREE_VIEW(widgets->UsersTree));
yon_gtk_tree_view_minimal_fixed_size_set_full(GTK_TREE_VIEW(widgets->GroupsTree));
yon_load_proceed(YON_CONFIG_LOCAL); yon_load_proceed(YON_CONFIG_LOCAL);
yon_interface_update((main_window*)widgets); yon_interface_update((main_window*)widgets);
gtk_widget_realize(GTK_WIDGET(widgets->UsersTree)); gtk_widget_realize(GTK_WIDGET(widgets->UsersTree));
yon_gtk_tree_view_minimal_fixed_size_set_full(GTK_TREE_VIEW(widgets->UsersTree));
gtk_widget_realize(GTK_WIDGET(widgets->GroupsTree)); gtk_widget_realize(GTK_WIDGET(widgets->GroupsTree));
yon_gtk_tree_view_minimal_fixed_size_set_full(GTK_TREE_VIEW(widgets->GroupsTree));
GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->UsersTree)); GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->UsersTree));
gtk_tree_view_column_set_min_width(GTK_TREE_VIEW_COLUMN(g_list_nth_data(list,1)),50);
gtk_tree_view_column_set_min_width(GTK_TREE_VIEW_COLUMN(g_list_nth_data(list,2)),175);
gtk_tree_view_column_set_min_width(GTK_TREE_VIEW_COLUMN(g_list_nth_data(list,3)),175);
for (guint i=0;i<g_list_length(list);i++){ for (guint i=0;i<g_list_length(list);i++){
if (i!=1&&i!=2&&i!=3)
yon_gtk_tree_view_column_minimal_fixed_size_set(GTK_TREE_VIEW_COLUMN(g_list_nth_data(list,i)));
yon_window_config_add_listener((GtkWidget*)g_list_nth_data(list,i),yon_char_append("UserColumn",yon_char_from_int(i)),"fixed-width",YON_TYPE_INT); yon_window_config_add_listener((GtkWidget*)g_list_nth_data(list,i),yon_char_append("UserColumn",yon_char_from_int(i)),"fixed-width",YON_TYPE_INT);
} }
g_list_free(list); g_list_free(list);
list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->GroupsTree)); list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->GroupsTree));
gtk_tree_view_column_set_min_width(GTK_TREE_VIEW_COLUMN(g_list_nth_data(list,0)),50);
gtk_tree_view_column_set_min_width(GTK_TREE_VIEW_COLUMN(g_list_nth_data(list,1)),175);
for (guint i=0;i<g_list_length(list);i++){ for (guint i=0;i<g_list_length(list);i++){
if (i!=0&&i!=1)
yon_gtk_tree_view_column_minimal_fixed_size_set(GTK_TREE_VIEW_COLUMN(g_list_nth_data(list,i)));
yon_window_config_add_listener((GtkWidget*)g_list_nth_data(list,i),yon_char_append("GroupColumn",yon_char_from_int(i)),"fixed-width",YON_TYPE_INT); yon_window_config_add_listener((GtkWidget*)g_list_nth_data(list,i),yon_char_append("GroupColumn",yon_char_from_int(i)),"fixed-width",YON_TYPE_INT);
} }
g_list_free(list); g_list_free(list);

@ -374,7 +374,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<object class="GtkTreeViewColumn"> <object class="GtkTreeViewColumn">
<property name="resizable">True</property> <property name="resizable">True</property>
<property name="sizing">fixed</property> <property name="sizing">fixed</property>
<property name="fixed-width">10</property> <property name="fixed-width">50</property>
<property name="min-width">10</property> <property name="min-width">10</property>
<property name="title" translatable="yes">UID</property> <property name="title" translatable="yes">UID</property>
<property name="sort-column-id">1</property> <property name="sort-column-id">1</property>

Loading…
Cancel
Save