[Bf-blender-cvs] [96439de7848] master: UI: Reduce limits for the text size theme options

Yevgeny Makarov noreply at git.blender.org
Thu Sep 3 15:47:45 CEST 2020


Commit: 96439de784801c7ed0072408a5238bb877af828e
Author: Yevgeny Makarov
Date:   Thu Sep 3 15:42:44 2020 +0200
Branches: master
https://developer.blender.org/rB96439de784801c7ed0072408a5238bb877af828e

UI: Reduce limits for the text size theme options

It was possible to increase the text size quite a lot, making text much
bigger than their containing widgets. These new limits makes the maximum
size of text be closer to the widget size.
Note that there needs to be some extra "wiggle room" since fonts may
have quite different glyph sizes. So you can still set the font size to
be slightly bigger than the widgets.

Addresses T80175 and T79059.

===================================================================

M	source/blender/makesrna/intern/rna_userdef.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 699e08302e7..cd0f6aa454f 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -1118,8 +1118,8 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
   RNA_def_struct_ui_text(srna, "Font Style", "Theme settings for Font");
 
   prop = RNA_def_property(srna, "points", PROP_INT, PROP_NONE);
-  RNA_def_property_range(prop, 6, 48);
-  RNA_def_property_ui_text(prop, "Points", "");
+  RNA_def_property_range(prop, 6, 24);
+  RNA_def_property_ui_text(prop, "Points", "Font size in points");
   RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
 
   prop = RNA_def_property(srna, "font_kerning_style", PROP_ENUM, PROP_NONE);



More information about the Bf-blender-cvs mailing list