UI: Asset Shelf (Experimental Feature) #104831

Closed
Julian Eisel wants to merge 399 commits from asset-shelf into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 2 additions and 5 deletions
Showing only changes of commit b35dd323c3 - Show all commits

View File

@ -3320,15 +3320,12 @@ void ED_region_header_layout(const bContext *C, ARegion *region)
bool region_layout_based = region->flag & RGN_FLAG_DYNAMIC_SIZE;
/* Height of buttons and scaling needed to achieve it. */
const bool is_fixed_header_height = region->type->prefsizey == HEADERY;
const int buttony = is_fixed_header_height ? UI_UNIT_Y :
region->winy - 2 * UI_SCALE_FAC - UI_HEADER_OFFSET;
const int buttony = min_ii(UI_UNIT_Y, region->winy - 2 * UI_SCALE_FAC);
const float buttony_scale = buttony / float(UI_UNIT_Y);
/* Vertically center buttons. */
int xco = UI_HEADER_OFFSET;
int yco = is_fixed_header_height ? buttony + (region->winy - buttony) / 2 :
buttony + UI_HEADER_OFFSET / 2;
int yco = buttony + (region->winy - buttony) / 2;
int maxco = xco;
/* XXX workaround for 1 px alignment issue. Not sure what causes it...