Clamp filters column width, collapse earlier #4107
Merged
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.

Any user suspected of farming GitHub activity with crypto purposes will get banned. Submitting broken code wastes the contributors' time, who have to spend their free time reviewing, fixing, and testing code that does not even compile breaks other features, or does not introduce any useful changes. I appreciate your understanding.
Important
Hello Martí, thank you so much for creating this tool! Since I have stumbled upon it one day, I cannot imagine managing installed packages and apps on Windows without it! 🙏
Why
I have played with UniGet UI one day and resized the filters pane over the maximum grid container width which due to storing the last set value in setting made the one of the view unusable for me (reinstall/update did not help, so I decided to build app from the source and adjust ActualWidth value via Property Explorer, which inspired that PR).
I have also spotted that width at which filters pane collapses could be higher, since below 200 pixels buttons and radios labels break line or become trimmed. Under ~150 pixels the content becomes almost fully overlapped via container spacing and other elements, so is seems reasonable to collapse filters pane earlier.
How
The following PR introduces the following changes:
onSizeChangedlistener to prevent situation like on the recording aboveI'm happy to adjust the values if you think that other ones would work better, especially 600 pixels max width is a quite arbitrary choice, and maybe it could be set to even lower value.
Preview