Fix missing background of buttons after reports

Reports would change the active emboss of the Block, to make some of its
buttons appear without background. But it didn't reset it so that
buttons added afterwards wouldn't use the correct embossing.
This commit is contained in:
2021-05-04 18:17:16 +02:00
parent 756c9b2219
commit b3ba41ecd1

View File

@@ -6830,6 +6830,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
uiLayout *ui_abs = uiLayoutAbsolute(layout, false);
uiBlock *block = uiLayoutGetBlock(ui_abs);
eUIEmbossType previous_emboss = UI_block_emboss_get(block);
UI_fontstyle_set(&style->widgetlabel);
int width = BLF_width(style->widgetlabel.uifont_id, report->message, report->len);
@@ -6904,6 +6905,8 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
width + UI_UNIT_X,
UI_UNIT_Y,
"Show in Info Log");
UI_block_emboss_set(block, previous_emboss);
}
void uiTemplateInputStatus(uiLayout *layout, struct bContext *C)