File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -613,6 +613,7 @@ void PopupMenu::_input_from_window_internal(const Ref<InputEvent> &p_event) {
613613 item_clickable_area.position .x += theme_cache.panel_style ->get_margin (SIDE_LEFT);
614614 item_clickable_area.position .y += theme_cache.panel_style ->get_margin (SIDE_TOP);
615615 item_clickable_area.position *= win_scale;
616+ item_clickable_area.size .width -= theme_cache.panel_style ->get_margin (SIDE_LEFT) + theme_cache.panel_style ->get_margin (SIDE_RIGHT);
616617 item_clickable_area.size .y -= theme_cache.panel_style ->get_margin (SIDE_TOP) + theme_cache.panel_style ->get_margin (SIDE_BOTTOM);
617618 item_clickable_area.size *= win_scale;
618619
@@ -626,7 +627,7 @@ void PopupMenu::_input_from_window_internal(const Ref<InputEvent> &p_event) {
626627 if (button_idx == MouseButton::LEFT || initial_button_mask.has_flag (mouse_button_to_mask (button_idx))) {
627628 if (b->is_pressed ()) {
628629 during_grabbed_click = false ;
629- is_scrolling = is_layout_rtl () ? b->get_position ().x < item_clickable_area.position .x : b->get_position ().x > item_clickable_area.size .width ;
630+ is_scrolling = is_layout_rtl () ? b->get_position ().x < item_clickable_area.position .x - item_clickable_area. size . width : b->get_position ().x > item_clickable_area.size .width + item_clickable_area. position . x ;
630631
631632 // Hide it if the shadows have been clicked.
632633 if (get_flag (FLAG_POPUP)) {
You can’t perform that action at this time.
0 commit comments