Configuration hub page element style changes

pull/207/head
parent d3ab9b4a61
commit 11daa7b57a

@ -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); 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->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->Image = gtk_image_new_from_pixbuf(gtk_icon_info_load_icon(info,NULL));
cur_icon->page = page; cur_icon->page = page;
GtkWidget *flow = gtk_flow_box_child_new(); GtkWidget *flow = gtk_flow_box_child_new();
gtk_style_context_add_class(gtk_widget_get_style_context(flow),"bggrey"); gtk_style_context_add_class(gtk_widget_get_style_context(flow),"bggrey");
gtk_widget_set_margin_end(cur_icon->Label,5); gtk_widget_set_margin_end(cur_icon->Label,5);
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);
gtk_label_set_xalign(GTK_LABEL(cur_icon->Label),0);
g_object_set_data(G_OBJECT(flow),"config_hub_icon",cur_icon); g_object_set_data(G_OBJECT(flow),"config_hub_icon",cur_icon);
gtk_container_add(GTK_CONTAINER(flow),cur_icon->MainBox); 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->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_flow_box_insert(target,flow,-1);
gtk_widget_show_all(flow); gtk_widget_show_all(flow);
free(name_wrapped);
} }
void yon_flow_box_clear(GtkFlowBox *target){ void yon_flow_box_clear(GtkFlowBox *target){

@ -2293,7 +2293,7 @@ agreement</property>
<property name="homogeneous">True</property> <property name="homogeneous">True</property>
<property name="column-spacing">5</property> <property name="column-spacing">5</property>
<property name="row-spacing">5</property> <property name="row-spacing">5</property>
<property name="max-children-per-line">150</property> <property name="max-children-per-line">15</property>
<property name="activate-on-single-click">False</property> <property name="activate-on-single-click">False</property>
</object> </object>
<packing> <packing>
@ -2341,7 +2341,7 @@ agreement</property>
<property name="homogeneous">True</property> <property name="homogeneous">True</property>
<property name="column-spacing">5</property> <property name="column-spacing">5</property>
<property name="row-spacing">5</property> <property name="row-spacing">5</property>
<property name="max-children-per-line">150</property> <property name="max-children-per-line">15</property>
<property name="activate-on-single-click">False</property> <property name="activate-on-single-click">False</property>
</object> </object>
<packing> <packing>
@ -2389,7 +2389,7 @@ agreement</property>
<property name="homogeneous">True</property> <property name="homogeneous">True</property>
<property name="column-spacing">5</property> <property name="column-spacing">5</property>
<property name="row-spacing">5</property> <property name="row-spacing">5</property>
<property name="max-children-per-line">150</property> <property name="max-children-per-line">15</property>
<property name="activate-on-single-click">False</property> <property name="activate-on-single-click">False</property>
</object> </object>
<packing> <packing>

Loading…
Cancel
Save