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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2003-10-21 15:46:12 +0400
committerTon Roosendaal <ton@blender.org>2003-10-21 15:46:12 +0400
commit0d1f7f1c7223ef6a939876dd5642368f6067f9f6 (patch)
tree0e8790ce72c77ebb486c30fc3a7f19a537073cc0 /source
parent8e2225e0278fed808dcaeb397d7f9cad41d4ee2e (diff)
- forgot to set 'minimal theme' callback for sliders, causing a crash when
displaying Constraint Panel in F7 menu.
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/interface_draw.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/source/blender/src/interface_draw.c b/source/blender/src/interface_draw.c
index de1bb856d5f..c434dcd9941 100644
--- a/source/blender/src/interface_draw.c
+++ b/source/blender/src/interface_draw.c
@@ -1124,6 +1124,33 @@ static void ui_draw_default(int type, int colorid, float aspect, float x1, float
// theme can define an embosfunc and sliderfunc, text drawing is standard, no theme.
+#if 0
+/* super minimal button as used in logic menu */
+static void ui_draw_round(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag)
+{
+
+ /* paper */
+ if(flag & UI_SELECT) {
+ if(flag & UI_ACTIVE) BIF_ThemeColorShade(colorid, -40);
+ else BIF_ThemeColorShade(colorid, -30);
+ }
+ else {
+ if(flag & UI_ACTIVE) BIF_ThemeColorShade(colorid, +10);
+ else BIF_ThemeColor(colorid);
+ }
+
+ uiSetRoundBox(15);
+ uiRoundBox(x1, y1, x2, y2, 6);
+
+ if(flag & UI_SELECT) {
+ BIF_ThemeColor(TH_TEXT);
+ uiRoundRect(x1, y1, x2, y2, 6);
+ }
+ else {
+ }
+}
+
+#endif
/* super minimal button as used in logic menu */
static void ui_draw_minimal(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag)
@@ -1413,7 +1440,11 @@ static void ui_draw_nothing(int type, int colorid, float asp, float x1, float y1
void ui_set_embossfunc(uiBut *but, int drawtype)
{
- // standard builtin
+
+ // not really part of standard minimal themes, just make sure it is set
+ but->sliderfunc= ui_draw_slider;
+
+ // standard builtin first:
if(but->type==LABEL) but->embossfunc= ui_draw_nothing;
else if(drawtype==UI_EMBOSSM) but->embossfunc= ui_draw_minimal;
else if(drawtype==UI_EMBOSSN) but->embossfunc= ui_draw_nothing;
@@ -1428,7 +1459,6 @@ void ui_set_embossfunc(uiBut *but, int drawtype)
}
else {
but->embossfunc= ui_draw_minimal;
- but->sliderfunc= ui_draw_slider;
}
}
}