Page Menu
Home
Search
Configure Global Search
Log In
Files
F2922
named-themes.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
gsr b3d (gsrb3d)
Nov 13 2013, 1:07 PM
Size
3 KB
Subscribers
None
named-themes.diff
View Options
Index: source/blender/include/BIF_resources.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/include/BIF_resources.h,v
retrieving revision 1.58
diff -u -p -r1.58 BIF_resources.h
--- source/blender/include/BIF_resources.h 25 Sep 2006 11:33:53 -0000 1.58
+++ source/blender/include/BIF_resources.h 1 Oct 2006 21:25:55 -0000
@@ -478,6 +478,12 @@ enum {
};
/* XXX WARNING: previous is saved in file, so do not change order! */
+/* FIXME(gsrb3d) This probably needs a better place or even style, like enum */
+/* Values for TH_BUT_DRAWTYPE field */
+#define THEME_MINIMAL 0
+#define THEME_SHADED 1
+#define THEME_ROUNDED 2
+#define THEME_OLDSKOOL 3
/* specific defines per space should have higher define values */
Index: source/blender/src/resources.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/resources.c,v
retrieving revision 1.60
diff -u -p -r1.60 resources.c
--- source/blender/src/resources.c 3 Jul 2006 09:49:12 -0000 1.60
+++ source/blender/src/resources.c 1 Oct 2006 21:25:55 -0000
@@ -358,7 +358,7 @@ void BIF_InitTheme(void)
SETCOL(btheme->tui.menu_hilite, 0x7F,0x7F,0x7F, 255);
SETCOL(btheme->tui.menu_text, 0, 0, 0, 255);
SETCOL(btheme->tui.menu_text_hi, 255, 255, 255, 255);
- btheme->tui.but_drawtype= 1;
+ btheme->tui.but_drawtype= THEME_SHADED;
/* space view3d */
SETCOL(btheme->tv3d.back, 115, 115, 115, 255);
Index: source/blender/src/interface_draw.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/interface_draw.c,v
retrieving revision 1.58
diff -u -p -r1.58 interface_draw.c
--- source/blender/src/interface_draw.c 29 Jun 2006 09:44:08 -0000 1.58
+++ source/blender/src/interface_draw.c 1 Oct 2006 21:25:56 -0000
@@ -2259,21 +2259,22 @@ void ui_set_embossfunc(uiBut *but, int d
else if(drawtype==UI_EMBOSSP) but->embossfunc= ui_draw_pulldown_item;
else if(drawtype==UI_EMBOSSR) but->embossfunc= ui_draw_round;
else {
- int theme= BIF_GetThemeValue(TH_BUT_DRAWTYPE);
-
// and the themes
- if(theme==1) {
+ switch (BIF_GetThemeValue(TH_BUT_DRAWTYPE)) {
+ case THEME_SHADED:
but->embossfunc= ui_draw_default;
but->sliderfunc= ui_default_slider;
- }
- else if(theme==2) {
+ break;
+ case THEME_ROUNDED:
but->embossfunc= ui_draw_round;
- }
- else if(theme==3) {
+ break;
+ case THEME_OLDSKOOL:
but->embossfunc= ui_draw_oldskool;
- }
- else {
+ break;
+ case THEME_MINIMAL:
+ default:
but->embossfunc= ui_draw_minimal;
+ break;
}
}
Index: source/blender/src/interface.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/interface.c,v
retrieving revision 1.243
diff -u -p -r1.243 interface.c
--- source/blender/src/interface.c 31 Jul 2006 19:23:42 -0000 1.243
+++ source/blender/src/interface.c 1 Oct 2006 21:25:57 -0000
@@ -5529,7 +5529,7 @@ void uiBlockEndAlign(uiBlock *block)
int flag= 0, cols=0, rows=0;
int theme= BIF_GetThemeValue(TH_BUT_DRAWTYPE);
- if ( !(theme==0 || theme==1 || theme==2) ) {
+ if ( !(theme==THEME_MINIMAL || theme==THEME_SHADED || theme==THEME_ROUNDED) ) {
block->flag &= ~UI_BUT_ALIGN; // all 4 flags
return;
}
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
87/66/a9dca1ec92bca3531dde5ee8f9a0
Event Timeline
Log In to Comment