-
Notifications
You must be signed in to change notification settings - Fork 158
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
Remove margin around TextEditor #419
Remove margin around TextEditor #419
Conversation
Most code editors have a margin on the line number panel to make it more readable and prettier. Removing the margin feels much worse to me. |
@Rekkonnect Thanks for the feedback. I was mainly worried about the margins on the other sides. Having space between the scrollbars and the window, felt like a bug. I pushed a small change. Keep some margin on the left for readability, remove the top/right/bottom margins. Here is what it looks like: |
35b1b41
to
bbd2e65
Compare
Increase the size of the LineNumberMargin to improve readability and ensure that there is some space between the line numbers and the next AbstractMargin.
bbd2e65
to
9c14ce0
Compare
I have added a property <AvalonEdit:TextEditor.Styles>
<Style Selector="editing|LineNumberMargin">
<Setter Property="MinWidthInDigits" Value="4" />
</Style>
</AvalonEdit:TextEditor.Styles> The defaults are as before to make sure that the changes in this PR don't mess up the layout of existing apps. |
This is a cosmetic PR that removes the 30px margin around the
TextEditor
in the demo.Before:
![image](https://private-user-images.githubusercontent.com/8617071/326180156-8a381776-8281-4944-9060-03a536382563.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4OTc5MzAsIm5iZiI6MTczOTg5NzYzMCwicGF0aCI6Ii84NjE3MDcxLzMyNjE4MDE1Ni04YTM4MTc3Ni04MjgxLTQ5NDQtOTA2MC0wM2E1MzYzODI1NjMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMThUMTY1MzUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmM0ZTdhMzZiOTQ0MTZmOTgxYTg0YjUyYmViOWFhNjQxMjUyNjFhOTk5ZmE2MmEzMDk0MGMxMjg4ZDQ1Y2Y2ZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.fIMrMID9eS-PDOaLvviSWvnVwi4MdnRtINdAPoNBnlw)
After:
![image](https://private-user-images.githubusercontent.com/8617071/326180113-e28d6b6f-4412-480f-a5c5-8a8312aa5009.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4OTc5MzAsIm5iZiI6MTczOTg5NzYzMCwicGF0aCI6Ii84NjE3MDcxLzMyNjE4MDExMy1lMjhkNmI2Zi00NDEyLTQ4MGYtYTVjNS04YTgzMTJhYTUwMDkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMThUMTY1MzUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Yjk3Y2Q4ZDBjZDFmYjAxMGY0NWExOWE4ZTZmMjJlYzM4Nzg2NTZjZmQ1NjY5ZTdlOWQwYjIzNzE0MDM5ZTdhZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.LtkhtQZRwPwS1exPDJF0usmlBP3ONYaH3QulZ-RIozg)
(Looking at the git history, the
Margin
has been there for the last 7+ years. I don't think that the margin serves any purpose. Let's remove it to avoid any confusion!)