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:
authorJeroen Bakker <j.bakker@atmind.nl>2019-05-09 16:53:44 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-09 20:55:10 +0300
commit5f7eebda23b844e932294b1ecaced46b5c75dde0 (patch)
tree0cdb5d6955d812a9ae5a64e8d48e8de76dffb4ee /source/blender/makesrna/intern/rna_userdef.c
parent9b924d73da90526f5caf31b01dfd34156337f075 (diff)
Themes: add setting to draw border around icons, use for Blender Light
Monochrome colored icons don't work well on a dark background, so now we can add a border around them. Note that most icons in the interface will remain without a border, just the outliner and properties editor navigation have colored icons and those will get a border. Other icons continue to be drawn in the text colored without a border. Differential Revision: https://developer.blender.org/D4787
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 6ece3cea529..c36c10fd4b3 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -42,6 +42,8 @@
#include "RNA_define.h"
#include "RNA_enum_types.h"
+#include "UI_interface_icons.h"
+
#include "rna_internal.h"
#include "WM_api.h"
@@ -195,6 +197,12 @@ static void rna_userdef_theme_update(Main *bmain, Scene *scene, PointerRNA *ptr)
rna_userdef_update(bmain, scene, ptr);
}
+static void rna_userdef_theme_update_icons(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ UI_icons_reload_internal_textures();
+ rna_userdef_theme_update(bmain, scene, ptr);
+}
+
/* also used by buffer swap switching */
static void rna_userdef_dpi_update(Main *UNUSED(bmain),
Scene *UNUSED(scene),
@@ -1412,6 +1420,13 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Shading", "");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
+
+ prop = RNA_def_property(srna, "icon_border_intensity", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "icon_border_intensity");
+ RNA_def_property_ui_text(
+ prop, "Icon Border", "Control the intensity of the border around themes icons");
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 2);
+ RNA_def_property_update(prop, 0, "rna_userdef_theme_update_icons");
}
static void rna_def_userdef_theme_space_common(StructRNA *srna)