2017-07-30 133 views
1

Kivy 1.10.0Kivy:更改RstDocument标题字体

的Python 3.6

我想使用RstDocuments时改变标题字体大小,颜色等。标题之间的默认差异非常小(只有较小的字体大小更改),如下所示。

enter image description here

我已经通过一些代码看了,但我不是一个非常有经验的Python程序员,并一直没能找到任何东西。

回答

0

您可以使用base_font_size

docs

base_font_size - Added in 1.8.0 
Font size for the biggest title, 31 by default. All other font sizes are 
derived from this. 

改变颜色每头/件/风格看:

colors Added in 1.1.0 
Dictionary of all the colors used in the RST rendering. 

Warning 
This dictionary is needs special handling. You also need to call RstDocument.render() if you change them after loading. colors is a DictProperty. 

underline_color Added in 1.1.0 
underline color of the titles, expressed in html color notation 
+0

谢谢你,但我米不知道这真的是我要找的。我正在修改特定的标题标记呈现。因此,例如,当我在上面的示例中使用标题3时,我希望文本是黑色,较小,并且没有下划线。我想要一种方法来挖掘代码(通过拦截默认输出,而不是通过更改核心代码)并将头显示更改为我想要的。 – John