Open sherief opened 1 year ago
Thank you for the issue report. I can confirm this.
It's not super trivial to change as that vertical alignment depends on: text-baseline, frame-padding, item-spacing, and our menu-bars are generic concepts where any items can be layed out. Both #597 and #3516 are hitting on the same family of problem.
Understandable. For now I have a WAR that adjusts Y==0 to Y = 1 when in fullscreen, and I don't have any issues with that.
BTW, it's also off by 3 pixels from the left. WAR-ed it the same way, but thought you should know. I didn't think that warrants filing a new bug but if that helps let me know and I'll file a separate one.
It's the same issue for me, thank you! On one hand the padding issue in #597 and #3516 should be fixed, but either way the fix for them won't include e.g. border-size (often 1 pixel) so for this we need to separate the hit-testing from visual a little bit and main-menu-bar may be specific here.
A weird but functional workaround would be to extend style.TouchExtraPadding
while submitting item in the main menu-bar, that will extend hit-testing range for those items. It will also leak to sub-menus but may be not noticeable.
Version/Branch of Dear ImGui:
Version: v1.87 WIP Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: custom, Win32 + D3D12 Compiler: MSVC 2022 Operating System: Windows 10
My Issue/Question:
I have an app with a menu bar and I noticed that the menu bar starts at y-coordinate of 1, not zero, so it's one pixel away from the top of the window. Ideally, it'd extend all the way to the top so as to become an infinite-height target and easier to reach with the mouse via sliding the cursor all the way to the top of the window when in fullscreen mode.
Screenshots/Video
Standalone, minimal, complete and verifiable example: N/A