Gtk3 label line spacing

可紊 提交于 2019-12-22 00:35:20

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!