Fix misalignment of menu items in Preferences > Save & Load menu
Checking for the layout alignment is not a reliable way to filter out which items need the additional icon/text offset. Instead check if the buttons are icon-only (which we rarely do, e.g. for collection colors in the Outliner context menu).
This commit is contained in:
@@ -2383,7 +2383,8 @@ static void widget_draw_text_icon(const uiFontStyle *fstyle,
|
||||
rect->xmin += 0.3f * U.widget_unit;
|
||||
}
|
||||
}
|
||||
else if (ui_block_is_menu(but->block) && but->alignnr == 0) {
|
||||
/* Menu items, but only if they are not icon-only (rare). */
|
||||
else if (ui_block_is_menu(but->block) && but->drawstr[0]) {
|
||||
rect->xmin += 0.2f * U.widget_unit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user