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:
authorCampbell Barton <ideasman42@gmail.com>2006-01-03 07:20:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2006-01-03 07:20:43 +0300
commitfc6ec33c89b71666648546c03a2d93ab8a213d44 (patch)
tree70ec741282b71854ce428b0b687ae52e6b79deba /source/blender/src/drawoops.c
parent5f48930a7514922efe7cebda971bd758e3d6b8cf (diff)
Adds a boarder around the oops, usefull to know where the oops bounds end with larger scenes.
I needed to do a make clean, then make to see this change.
Diffstat (limited to 'source/blender/src/drawoops.c')
-rw-r--r--source/blender/src/drawoops.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/source/blender/src/drawoops.c b/source/blender/src/drawoops.c
index 13e36dffefc..032b78eec9c 100644
--- a/source/blender/src/drawoops.c
+++ b/source/blender/src/drawoops.c
@@ -373,8 +373,8 @@ void draw_oops(Oops *oops)
} else { /* NO ICON, UNINDENT*/
v1[0] -= 1.3 / oopscalex;
}
- if(oops->flag & SELECT) cpack(0xFFFFFF);
- else cpack(0x0);
+ if(oops->flag & SELECT) BIF_ThemeColor(TH_TEXT_HI);
+ else BIF_ThemeColor(TH_TEXT);
glRasterPos3f(v1[0], v1[1], 0.0);
BMF_DrawString(font, str);
@@ -427,6 +427,12 @@ void drawoopsspace(ScrArea *sa, void *spacedata)
float col[3];
BIF_GetThemeColor3fv(TH_BACK, col);
+
+ /* darker background for oops */
+ if(soops->type!=SO_OUTLINER) {
+ col[0] = col[0] * 0.75; col[1] = col[1] * 0.75; col[2] = col[2] * 0.75;
+ }
+
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
if(soops==0) return;
@@ -442,7 +448,20 @@ void drawoopsspace(ScrArea *sa, void *spacedata)
oopscalex= .14*((float)curarea->winx)/(G.v2d->cur.xmax-G.v2d->cur.xmin);
calc_ipogrid(); /* for scrollvariables */
-
+
+
+ /* Draw a page about the oops */
+ BIF_GetThemeColor3fv(TH_BACK, col);
+ glColor3fv(col);
+ glRectf(G.v2d->tot.xmin-2, G.v2d->tot.ymin-2, G.v2d->tot.xmax+2, G.v2d->tot.ymax+2); /* light square in the centre */
+ BIF_ThemeColorShade(TH_BACK, -96); /* drop shadow color */
+ glRectf(G.v2d->tot.xmin-1, G.v2d->tot.ymin-2, G.v2d->tot.xmax+3, G.v2d->tot.ymin-3); /* bottom dropshadow */
+ glRectf(G.v2d->tot.xmax+2, G.v2d->tot.ymin-2, G.v2d->tot.xmax+3, G.v2d->tot.ymax+1); /* right hand dropshadow */
+ /* box around the oops. */
+ cpack(0x0);
+ mysbox(G.v2d->tot.xmin-2, G.v2d->tot.ymin-2, G.v2d->tot.xmax+2, G.v2d->tot.ymax+2);
+
+
/* Set the font size for the oops based on the zoom level */
if (oopscalex > 6.0) font = BMF_GetFont(BMF_kScreen15);
else if (oopscalex > 3.5) font = G.font;