From 74ed4024908dfd2ab82ad842e9289c823aea94ad Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Jan 2006 16:55:31 +0000 Subject: [PATCH] Exclude labels from grouping. - Clever numbuts look nicer with rounded theme. --- source/blender/src/toolbox.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c index b4692ca9964..973a01d9187 100644 --- a/source/blender/src/toolbox.c +++ b/source/blender/src/toolbox.c @@ -1347,6 +1347,9 @@ int do_clever_numbuts(char *name, int tot, int winevent) /* WATCH IT: TEX BUTTON EXCEPTION */ /* WARNING: ONLY A SINGLE BIT-BUTTON POSSIBLE: WE WORK AT COPIED DATA! */ + + BIF_ThemeColor(TH_MENU_TEXT); /* makes text readable on dark theme */ + uiDefBut(block, LABEL, 0, name, (short)(x1+15), (short)(y2-35), (short)(sizex-60), 19, 0, 1.0, 0.0, 0, 0, ""); /* @@ -1358,12 +1361,22 @@ int do_clever_numbuts(char *name, int tot, int winevent) uiBlockBeginAlign(block); varstr= &numbuts[0]; for(a=0; atype==TEX) { uiDefBut(block, TEX, 0, varstr->name,(short)(x1+15),(short)(y2-55-20*a),(short)(sizex-60), 19, numbpoin[a], varstr->min, varstr->max, 0, 0, varstr->tip); } else { + + if(varstr->type==LABEL) /* dont include the label when rounding the buttons */ + uiBlockEndAlign(block); + uiDefBut(block, varstr->type, 0, varstr->name,(short)(x1+15),(short)(y2-55-20*a), (short)(sizex-60), 19, &(numbdata[a]), varstr->min, varstr->max, 100, 0, varstr->tip); + + if(varstr->type==LABEL) + uiBlockBeginAlign(block); } + + } uiBlockEndAlign(block);