问题
Is there any way to specify spacing between lines of text in multiline Gtk3 Label, as with CSS line-height property? This CSS property does not work and I can't google out anything else.
回答1:
I found the solution using Pangoattribute on label
<br>PangoAttrList *attr_list;</br>
<br>PangoAttribute *attr;</br>
<br> attr_list=pango_attr_list_new();</br>
<br>attr=pango_attr_rise_new (20000);</br>
<br>pango_attr_list_insert(attr_list,attr);</br>
<br>gtk_label_set_attributes(GTK_LABEL(label),attr_list);</br>
来源:https://stackoverflow.com/questions/25139645/gtk3-label-line-spacing