Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main menu bar isn't affected by DisplaySafeAreaPadding #1439

Closed
ldecarufel opened this issue Nov 14, 2017 · 5 comments
Closed

Main menu bar isn't affected by DisplaySafeAreaPadding #1439

ldecarufel opened this issue Nov 14, 2017 · 5 comments
Labels
bug menus menu bars, menu items

Comments

@ldecarufel
Copy link

The main menu bar ignores the DisplaySafeAreaPadding style and is always drawn at (0,0).
On TVs with overscan, the main menu can be unusable because it is drawn above the visible area.

@ocornut ocornut added bug menus menu bars, menu items labels Nov 14, 2017
@ocornut
Copy link
Owner

ocornut commented Apr 18, 2018

Hello Louis, I think a PR is coming for that and I will look at it. My concern is/was that the padding within the menu bar will almost necessarily always look asymmetrical in that situation.

Out of curiosity, which sorts of value and/or range do you typically use for safe area padding? And what’s the font size?

@ocornut
Copy link
Owner

ocornut commented Apr 18, 2018

Ought to clarify: the reason the asymmetry is problematic is because we have a non-zero default value of ImVec2(4,4) for DisplaySafeAreaPadding, and we probably don't want an asymmetrical menu bar when used on a computer with default settings. So perhaps will change the default value to (0,0) and/or use Max(DisplaySafeAreaPadding, FramePadding) which would be ok unless FramePadding.y is smaller.

ocornut pushed a commit that referenced this issue Apr 18, 2018
… x position. Fixes main menu bar problems with TVs. (#1439)
ocornut added a commit that referenced this issue Apr 18, 2018
…splaySafeAreaPadding defaults to (3,3) instead of (4.4). Comments, tab to spaces, Changelog. (#1439)
@ocornut
Copy link
Owner

ocornut commented Apr 18, 2018

Louis, this should be fixed now (see 2 commits above). I also made a third commit to improve handling of the safe area for popups/tooltips/menus.

In the future viewport branch this setting will evolve a little, as safe area may be defined on a per-monitor basis. I'm not touching it right now because I don't have much visibility on this but ideally viewports could be used across two machines.

@ocornut
Copy link
Owner

ocornut commented Jul 26, 2021

@ldecarufel Are you still using DisplaySafeAreaPadding ?
AFAIK all current platforms apart from Xbox One have safe area data pulled from OS settings, unless Xbox One was improved since (last checked in 2017). Do you remember the context for using this?

Tagging @dougbinks as I vaguely remember (might be wrong) that you allow used safe area? (EDIT: well yes, you submitted part of it :)

(EDIT: Basically I am trying to figure out if nowadays it would be reasonable to drop SafeArea padding support)

@dougbinks
Copy link
Contributor

I know of no way on PC Windows to set the safe area for a TV, so I would have thought this was still required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug menus menu bars, menu items
Projects
None yet
Development

No branches or pull requests

3 participants