Gtk3 label line spacing

2019-04-16 00:56发布

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.

标签: gtk gtk3 css
1条回答
贼婆χ
2楼-- · 2019-04-16 01:01

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>
查看更多
登录 后发表回答