Skip to content

Conversation

TWaalen
Copy link
Contributor

@TWaalen TWaalen commented Feb 19, 2025

I noticed that the text editor for the content or response of an HTTP request was not cut-off at the right edge. After some investigation this seems to be due to the negative margins of the parent grid, adding positive margins to the text editor fixed this.

However, the control would then not take up the entire available width and dynamically expanded before actually showing the scrollbar. I fixed this by force setting the text editor width to the bounds width, whenever the bounds changed. I am not very familiar with Avalonia, so there might be a better way to do this.

Let me know if you want me to drop the first commit or make a separate PR for it as it is unrelated to the rest of this PR. It avoids a (caught) exception in InstallTextMate due to the editor document always being null at construction.

This fixes #101.

This is run on construction and the editor document will always be null here.
…ntrols

The negative margins were causing the editor control to be cut off, this makes
sure the entire control is visible.
The text editor control seems to reserve width for the vertical scrollbar and
then dynamically increase the width of the control before actually displaying
the scrollbar. This forces the control to always take the available width.
@alexandrehtrb
Copy link
Owner

Hello!

Welcome!
I tested it here and it fixes the scrollbar problem.
Thanks for your contribution!

@alexandrehtrb alexandrehtrb merged commit 3720d7e into alexandrehtrb:develop Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scrollbar visibilty
2 participants