godot icon indicating copy to clipboard operation
godot copied to clipboard

MenuBar breaks if the windows content_scale_mode != disabled and the window is resized

Open whiteshampoo opened this issue 2 years ago • 5 comments

Godot version

4.0 beta 16

System information

Windows 11 (does not seem to matter)

Issue description

MenuBar reacts to mouseclicks strange, if content_scale_mode is not disabled and the window is resized/in fullscreen. It looks like the problem is worse on the upper-half of the menu-button.

menubar_1

menubar_2

Steps to reproduce

Use a MenuBar, set the content_scale_mode (stretch mode) to cansvas_items or viewport and resize/fullscreen the window.

Minimal reproduction project

MenuTest.zip

whiteshampoo avatar Feb 01 '23 19:02 whiteshampoo

(does also happen in beta 17)

whiteshampoo avatar Feb 01 '23 20:02 whiteshampoo

Can confirm this on Linux. Beta 1 also had this problem.

Sauermann avatar Feb 01 '23 21:02 Sauermann

Still broken in RC 1

whiteshampoo avatar Feb 08 '23 16:02 whiteshampoo

I also encountered this problem. System: win10 Version: godot4,0

zjf0123 avatar Mar 07 '23 08:03 zjf0123

Through some attempts, I found that this bug can be triggered stably: 1.Set the display/window/stretch/mode to canvas_items in the project settings. 2. Set display/window/size/viewport_ Width and display/window/size/window_width_override to different values. 3. If the window size is adjusted when running a scene containing menubar, this bug will be triggered.

zjf0123 avatar Mar 07 '23 08:03 zjf0123

This seems the same as #86240, already fixed by #86304.

Indeed:

  • can reproduce in v4.2.1.stable.official [b09f793f5], v4.3.dev2.official [352434668].
  • can't reproduce in v4.2.2.stable.official [15073afe3], v4.3.beta1.official [a4f2ea91a].

Closing as fixed.

kleonc avatar Jun 06 '24 07:06 kleonc