Commit: 9de6520251f44d920fde561322b28655101653f6
Author: Julian Eisel
Date:   Tue Jun 2 19:26:38 2015 +0200
Branches: UI-graphical-redesign
https://developer.blender.org/rB9de6520251f44d920fde561322b28655101653f6

Flatify the UI!

By disabling shaded drawing for all widgets

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

M       source/blender/editors/interface/resources.c
M       source/blender/makesdna/DNA_userdef_types.h

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

diff --git a/source/blender/editors/interface/resources.c 
b/source/blender/editors/interface/resources.c
index 26d5828..8ac708f 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -2642,6 +2642,7 @@ void init_userdef_do_versions(void)
        if (U.versionfile < 274 || (U.versionfile == 274 && U.subversionfile < 
6)) {
                bTheme *btheme;
                ThemeSpace *ts;
+               uiWidgetColors *wcol;
 
                for (btheme = U.themes.first; btheme; btheme = btheme->next) {
                        btheme->tui.wcol_box.roundness = 0.2f;
@@ -2662,6 +2663,10 @@ void init_userdef_do_versions(void)
                        btheme->tui.wcol_tool.roundness = 0.25f;
                        btheme->tui.wcol_tooltip.roundness = 0.2f;
 
+                       for (wcol = UI_THEMEWIDGETS_START(&btheme->tui); wcol 
!= UI_THEMEWIDGETS_END(&btheme->tui); wcol++) {
+                               wcol->shaded = 0;
+                       }
+
                        for (ts = UI_THEMESPACE_START(btheme); ts != 
UI_THEMESPACE_END(btheme); ts++) {
                                /* XXX maybe remove show_back/show_header 
options? */
                                ts->panelcolors.show_back = 
ts->panelcolors.show_header = true;
diff --git a/source/blender/makesdna/DNA_userdef_types.h 
b/source/blender/makesdna/DNA_userdef_types.h
index 45f70b0..cfd742f 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -398,6 +398,9 @@ typedef struct bTheme {
 #define UI_THEMESPACE_START(btheme)  (CHECK_TYPE_INLINE(btheme, bTheme *),  
&((btheme)->tbuts))
 #define UI_THEMESPACE_END(btheme)    (CHECK_TYPE_INLINE(btheme, bTheme *), 
(&((btheme)->tclip) + 1))
 
+#define UI_THEMEWIDGETS_START(tui)   (CHECK_TYPE_INLINE(tui, ThemeUI *),  
&((tui)->wcol_regular))
+#define UI_THEMEWIDGETS_END(tui)     (CHECK_TYPE_INLINE(tui, ThemeUI *), 
(&((tui)->wcol_pie_menu) + 1))
+
 /* for the moment only the name. may want to store options with this later */
 typedef struct bAddon {
        struct bAddon *next, *prev;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to