breaking: make menu screen size aware in less-buttons#448
Open
trigg wants to merge 6 commits into
Open
Conversation
…le screen size, if it is too large this is breaking because the way size is calculated is not consistent with before the change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A fix for the fix for the fix...
Menu is a special-case for popups because allowing automatic sizing ends up with unacceptable sizes every time. The first fix was the force the minimum size of each section.
This ran into another problem where if (due to resolution changes, scale changes, or device hotplug) the menu is now bigger than the remaining space, it simply does not show up.
In less-buttons we fix all other popups by putting them inside a scrolled view if there is a chance they could overflow. This in turn causes menu to force a minimum size and gain a scroll bar, which is hideous.
So this (partly written) fix will allow the menu to work around this too. If it detects it is being shown in a scrolled view which has more internal space than physical it will resize down to match, hiding the scrollbar but ignoring the over-large size the user has requested.
This will not be a main feature of less-buttons for every widget on the panel simply because all the others have their size set ONLY on contents, not artificially larger. So a scrolled area will only happen when it's that or no popup at all.