UI: collapse redo panel by default
For some operators this fills a lot of vertical space, users can expand it if they need. Also remove workaround for T56752 (now fixed).
This commit is contained in:
@@ -134,6 +134,7 @@ static void hud_panels_register(ARegionType *art, int space_type, int region_typ
|
||||
pt->poll = hud_panel_operator_redo_poll;
|
||||
pt->space_type = space_type;
|
||||
pt->region_type = region_type;
|
||||
pt->flag |= PNL_DEFAULT_CLOSED;
|
||||
BLI_addtail(&art->paneltypes, pt);
|
||||
}
|
||||
|
||||
@@ -212,20 +213,7 @@ static void hud_region_draw(const bContext *C, ARegion *ar)
|
||||
GPU_clear(GPU_COLOR_BIT);
|
||||
|
||||
if ((ar->flag & RGN_FLAG_HIDDEN) == 0) {
|
||||
if (0) {
|
||||
/* Has alpha flickering glitch, see T56752. */
|
||||
ui_draw_menu_back(NULL, NULL, &(rcti){.xmax = ar->winx, .ymax = ar->winy});
|
||||
}
|
||||
else {
|
||||
/* Use basic drawing instead. */
|
||||
bTheme *btheme = UI_GetTheme();
|
||||
float color[4];
|
||||
rgba_uchar_to_float(color, (const uchar *)btheme->tui.wcol_menu_back.inner);
|
||||
const float radius = U.widget_unit * btheme->tui.wcol_menu_back.roundness;
|
||||
UI_draw_roundbox_corner_set(UI_CNR_ALL);
|
||||
UI_draw_roundbox_4fv(true, 0, 0, ar->winx, ar->winy, radius, color);
|
||||
}
|
||||
|
||||
ui_draw_menu_back(NULL, NULL, &(rcti){.xmax = ar->winx, .ymax = ar->winy});
|
||||
ED_region_panels_draw(C, ar);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user