diff --git a/source/ubinstall-gtk-config-hub.c b/source/ubinstall-gtk-config-hub.c index 40dea24..228a430 100644 --- a/source/ubinstall-gtk-config-hub.c +++ b/source/ubinstall-gtk-config-hub.c @@ -140,23 +140,25 @@ void yon_configuration_hub_add(GtkFlowBox *target, char *name, char *icon, enum GtkIconInfo *info = gtk_icon_theme_lookup_icon_for_scale(gtk_icon_theme_get_default(),icon,54,1,GTK_ICON_LOOKUP_FORCE_SIZE); - char *name_wrapped = yon_char_wrap_to_length_str(name,30); cur_icon->MainBox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5); - cur_icon->Label = gtk_label_new(name_wrapped); + cur_icon->Label = gtk_label_new(name); cur_icon->Image = gtk_image_new_from_pixbuf(gtk_icon_info_load_icon(info,NULL)); cur_icon->page = page; GtkWidget *flow = gtk_flow_box_child_new(); gtk_style_context_add_class(gtk_widget_get_style_context(flow),"bggrey"); gtk_widget_set_margin_end(cur_icon->Label,5); - - gtk_label_set_xalign(GTK_LABEL(cur_icon->Label),0); + gtk_label_set_line_wrap(GTK_LABEL(cur_icon->Label),1); + gtk_label_set_max_width_chars(GTK_LABEL(cur_icon->Label),15); + gtk_label_set_xalign(GTK_LABEL(cur_icon->Label), GTK_ALIGN_FILL); + gtk_label_set_line_wrap_mode(GTK_LABEL(cur_icon->Label),PANGO_WRAP_WORD); + g_object_set_data(G_OBJECT(flow),"config_hub_icon",cur_icon); gtk_container_add(GTK_CONTAINER(flow),cur_icon->MainBox); + gtk_widget_set_hexpand(flow,0); gtk_box_pack_start(GTK_BOX(cur_icon->MainBox),cur_icon->Image,0,0,0); - gtk_box_pack_start(GTK_BOX(cur_icon->MainBox),cur_icon->Label,0,0,0); + gtk_box_pack_start(GTK_BOX(cur_icon->MainBox),cur_icon->Label,1,1,0); gtk_flow_box_insert(target,flow,-1); gtk_widget_show_all(flow); - free(name_wrapped); } void yon_flow_box_clear(GtkFlowBox *target){ diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index dfc5b0f..11ee448 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -2293,7 +2293,7 @@ agreement True 5 5 - 150 + 15 False @@ -2341,7 +2341,7 @@ agreement True 5 5 - 150 + 15 False @@ -2389,7 +2389,7 @@ agreement True 5 5 - 150 + 15 False