Exclude labels from grouping. - Clever numbuts look nicer with rounded theme.
This commit is contained in:
@@ -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; a<tot; a++, varstr++) {
|
||||
|
||||
if(varstr->type==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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user