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:
authorThomas Dinges <blender@dingto.org>2010-01-15 20:00:37 +0300
committerThomas Dinges <blender@dingto.org>2010-01-15 20:00:37 +0300
commit1b580dde6e633056c1a9f0436b778dc2797ef469 (patch)
tree999a4f9b774dde27d27abc05d3d5979accc6d2a7 /source/blender/editors
parent3ff987c46a284c6fe7acb574d42a25c32ee29f7a (diff)
Console:
* Added Theme support for the console. You can change: -Header Color -Text Color of Output, Input, Info and Error Messages. (Inside the User Preferences -> Themes)
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/include/UI_resources.h5
-rw-r--r--source/blender/editors/interface/resources.c21
-rw-r--r--source/blender/editors/space_console/console_draw.c12
3 files changed, 34 insertions, 4 deletions
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index 787a39591c7..ad06e56dfa3 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -184,6 +184,11 @@ enum {
TH_NODE_CONVERTOR,
TH_NODE_GROUP,
+ TH_CONSOLE_OUTPUT,
+ TH_CONSOLE_INPUT,
+ TH_CONSOLE_INFO,
+ TH_CONSOLE_ERROR,
+
TH_SEQ_MOVIE,
TH_SEQ_IMAGE,
TH_SEQ_SCENE,
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 15513daa624..28f9a6e79f5 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -154,6 +154,9 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
case SPACE_USERPREF:
ts= &btheme->tuserpref;
break;
+ case SPACE_CONSOLE:
+ ts= &btheme->tconsole;
+ break;
case SPACE_TIME:
ts= &btheme->ttime;
break;
@@ -340,6 +343,15 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
case TH_SEQ_META:
cp= ts->meta; break;
+ case TH_CONSOLE_OUTPUT:
+ cp= ts->console_output; break;
+ case TH_CONSOLE_INPUT:
+ cp= ts-> console_input; break;
+ case TH_CONSOLE_INFO:
+ cp= ts->console_info; break;
+ case TH_CONSOLE_ERROR:
+ cp= ts->console_error; break;
+
case TH_HANDLE_VERTEX:
cp= ts->handle_vertex;
break;
@@ -407,6 +419,7 @@ static void ui_theme_init_new(bTheme *btheme)
ui_theme_init_new_do(&btheme->tnode);
ui_theme_init_new_do(&btheme->tlogic);
ui_theme_init_new_do(&btheme->tuserpref);
+ ui_theme_init_new_do(&btheme->tconsole);
}
@@ -594,6 +607,14 @@ void ui_theme_init_userdef(void)
/* space user preferences */
btheme->tuserpref= btheme->tv3d;
SETCOLF(btheme->tuserpref.back, 0.45, 0.45, 0.45, 1.0);
+
+ /* space console */
+ btheme->tconsole= btheme->tv3d;
+ SETCOL(btheme->tconsole.console_output, 96, 128, 255, 255);
+ SETCOL(btheme->tconsole.console_input, 255, 255, 255, 255);
+ SETCOL(btheme->tconsole.console_info, 0, 170, 0, 255);
+ SETCOL(btheme->tconsole.console_error, 220, 96, 96, 255);
+
/* space sound */
btheme->tsnd= btheme->tv3d;
diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c
index ab1fc8a5fca..3fee2b6277b 100644
--- a/source/blender/editors/space_console/console_draw.c
+++ b/source/blender/editors/space_console/console_draw.c
@@ -78,16 +78,20 @@ static void console_line_color(unsigned char *fg, int type)
{
switch(type) {
case CONSOLE_LINE_OUTPUT:
- fg[0]=96; fg[1]=128; fg[2]=255;
+ UI_GetThemeColor3ubv(TH_CONSOLE_OUTPUT, fg);
+ fg[0], fg[1], fg[2];
break;
case CONSOLE_LINE_INPUT:
- fg[0]=255; fg[1]=255; fg[2]=255;
+ UI_GetThemeColor3ubv(TH_CONSOLE_INPUT, fg);
+ fg[0], fg[1], fg[2];
break;
case CONSOLE_LINE_INFO:
- fg[0]=0; fg[1]=170; fg[2]=0;
+ UI_GetThemeColor3ubv(TH_CONSOLE_INFO, fg);
+ fg[0], fg[1], fg[2];
break;
case CONSOLE_LINE_ERROR:
- fg[0]=220; fg[1]=96; fg[2]=96;
+ UI_GetThemeColor3ubv(TH_CONSOLE_ERROR, fg);
+ fg[0], fg[1], fg[2];
break;
}
}