You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Fix PopupMenu accel position
This commit is contained in:
@@ -965,7 +965,7 @@ void PopupMenu::_draw_items() {
|
|||||||
} else {
|
} else {
|
||||||
item_ofs.x = display_width - theme_cache.panel_style->get_margin(SIDE_RIGHT) - items[i].accel_text_buf->get_size().x - theme_cache.item_end_padding;
|
item_ofs.x = display_width - theme_cache.panel_style->get_margin(SIDE_RIGHT) - items[i].accel_text_buf->get_size().x - theme_cache.item_end_padding;
|
||||||
}
|
}
|
||||||
Vector2 text_pos = item_ofs + Point2(0, Math::floor((h - items[i].text_buf->get_size().y) / 2.0));
|
Vector2 text_pos = item_ofs + Point2(0, Math::floor((h - items[i].accel_text_buf->get_size().y) / 2.0));
|
||||||
if (theme_cache.font_outline_size > 0 && theme_cache.font_outline_color.a > 0) {
|
if (theme_cache.font_outline_size > 0 && theme_cache.font_outline_color.a > 0) {
|
||||||
items[i].accel_text_buf->draw_outline(ci, text_pos, theme_cache.font_outline_size, theme_cache.font_outline_color);
|
items[i].accel_text_buf->draw_outline(ci, text_pos, theme_cache.font_outline_size, theme_cache.font_outline_color);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user