User Interface / Preferences:

* Added a new "Text Style" area into the theme section, with settings to control font kerning, shadow size, color and offset.
This commit is contained in:
Thomas Dinges 2012-12-24 00:29:24 +00:00
parent c52468d31d
commit 388c08c88b
2 changed files with 38 additions and 1 deletions

@ -22,6 +22,27 @@ from bpy.types import Header, Menu, Panel
import os
def ui_style_items(col, context):
""" UI Style settings """
split = col.split()
col = split.column()
col.label(text="Kerning Style:")
col.row().prop(context, "font_kerning_style", expand=True)
col.prop(context, "points")
col = split.column()
col.label(text="Shadow Offset:")
col.prop(context, "shadow_offset_x", text="X")
col.prop(context, "shadow_offset_y", text="Y")
col = split.column()
col.prop(context, "shadow")
col.prop(context, "shadowalpha")
col.prop(context, "shadowcolor")
def ui_items_general(col, context):
""" General UI Theme Settings (User Interface)
"""
@ -774,6 +795,21 @@ class USERPREF_PT_theme(Panel):
colsub = padding.column()
colsub = padding.column()
colsub.row().prop(ui, "show_colored_constraints")
elif theme.theme_area == 'STYLE':
col = split.column()
style = context.user_preferences.ui_styles[0]
ui = style.widget
col.label(text="Widget:")
ui_style_items(col, ui)
col.separator()
col.separator()
ui = style.widget_label
col.label(text="Widget Label:")
ui_style_items(col, ui)
else:
self._theme_generic(split, getattr(theme, theme.theme_area.lower()))

@ -437,7 +437,7 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
static EnumPropertyItem font_kerning_style[] = {
{0, "UNFITTED", 0, "Unfitted", "Use scaled but un-grid-fitted kerning distances"},
{1, "DEFAULT", 0, "Default", "Use scaled and grid-fitted kerning distances"},
{1, "FITTED", 0, "Fitted", "Use scaled and grid-fitted kerning distances"},
{0, NULL, 0, NULL, NULL}
};
@ -2214,6 +2214,7 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
static EnumPropertyItem active_theme_area[] = {
{0, "USER_INTERFACE", ICON_UI, "User Interface", ""},
{19, "STYLE", ICON_FONTPREVIEW, "Text Style", ""},
{18, "BONE_COLOR_SETS", ICON_COLOR, "Bone Color Sets", ""},
{1, "VIEW_3D", ICON_VIEW3D, "3D View", ""},
{2, "TIMELINE", ICON_TIME, "Timeline", ""},