summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-16 14:29:37 +0100
committerGitHub <noreply@github.com>2018-12-16 14:29:37 +0100
commitf00c5c00d7fbd9d5d8c22534cdbbfa3b68dfc54b (patch)
tree2fa39f059ae427ea53fd07b223b1f165dcf95d4e /scene
parent9df7ed59fb39e38db30326365adc18afb79903bb (diff)
parent04ea79c738b02596a701bb7e7712448bcd67b142 (diff)
Merge pull request #24379 from YeldhamDev/popupmenu_itemofs_highlight_fix
Fix item highlighting in PopupMenu for items with offset
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/popup_menu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index f621522102..82d6e6480e 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -453,7 +453,6 @@ void PopupMenu::_notification(int p_what) {
Color icon_color(1, 1, 1, items[i].disabled ? 0.5 : 1);
- item_ofs.x += items[i].h_ofs;
if (!items[i].icon.is_null()) {
icon_size = items[i].icon->get_size();
@@ -470,6 +469,7 @@ void PopupMenu::_notification(int p_what) {
String text = items[i].shortcut.is_valid() ? String(tr(items[i].shortcut->get_name())) : items[i].xl_text;
+ item_ofs.x += items[i].h_ofs;
if (items[i].separator) {
int sep_h = separator->get_center_size().height + separator->get_minimum_size().height;