Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Fox <mfoxdogg@gmail.com>2010-11-27 01:12:46 +0300
committerMichael Fox <mfoxdogg@gmail.com>2010-11-27 01:12:46 +0300
commitd47a519cbb70fabe7a105fee31be86d181541dbb (patch)
treed42b3159e66784d1aa4dd6bf72148f923ee7dd54 /source/blender/makesrna/intern/rna_userdef.c
parent8f4d8ad5bc173ab38a18c380dc5a5161eab6aa17 (diff)
added option to turn off Text anti-aliasing in the UI
(userpref->system), with a great help from brecht (its been way too long for me). However as brecht pointed out that the non-AA text is slightly lareger then AA'ed Text :S, i did not do anything about this as this commit was just the option not the text drawing. this commit also makes it possible to do all kinds of UI textrender options
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 8d5483efcb3..116e25030d6 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -44,13 +44,17 @@
#ifdef RNA_RUNTIME
-#include "BKE_main.h"
-#include "BKE_DerivedMesh.h"
-#include "BKE_depsgraph.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
-#include "GPU_draw.h"
+
+#include "BKE_DerivedMesh.h"
+#include "BKE_depsgraph.h"
#include "BKE_global.h"
+#include "BKE_main.h"
+
+#include "GPU_draw.h"
+
+#include "BLF_api.h"
#include "MEM_guardedalloc.h"
#include "MEM_CacheLimiterC-Api.h"
@@ -254,6 +258,12 @@ static void rna_userdef_temp_update(Main *bmain, Scene *scene, PointerRNA *ptr)
BLI_where_is_temp(btempdir, 1);
}
+static void rna_userdef_text_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ BLF_cache_clear();
+ WM_main_add_notifier(NC_WINDOW, NULL);
+}
+
#else
static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
@@ -2575,6 +2585,11 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_range(prop, 50, 1000);
RNA_def_property_ui_text(prop, "Wait Timer (ms)", "Time in milliseconds between each frame recorded for screencast");
+ prop= RNA_def_property(srna, "use_text_antialiasing", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "text_render", USER_TEXT_DISABLE_AA);
+ RNA_def_property_ui_text(prop, "Text Anti-aliasing", "Draw user interface text anti-aliased");
+ RNA_def_property_update(prop, 0, "rna_userdef_text_update");
+
#if 0
prop= RNA_def_property(srna, "verse_master", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "versemaster");