feat: Add top and bottom offset for content; Make horizontal scrollbar usable#21
Closed
Storik4pro wants to merge 15 commits intoFrozenAssassine:masterfrom
Closed
feat: Add top and bottom offset for content; Make horizontal scrollbar usable#21Storik4pro wants to merge 15 commits intoFrozenAssassine:masterfrom
Storik4pro wants to merge 15 commits intoFrozenAssassine:masterfrom
Conversation
Now horizontal scrollbar doesn't interfere text editing and selection on last line (Before this change user can misclick on scrollbar instead of text line)
…g VerticalDrawOffset to class functions VerticalDrawOffset will be applyed to: - CalculateLinesToRender function - SearchHighlightsRenderer.RenderHighlights (OffsetTop param) - CanvasDrawingSession.DrawTextLayout (Y param) - invisibleCharactersRenderer.DrawTabsAndSpaces (singleLineHeight param) Also: - UpdateScrollOffset function will be added for handle control vertical scroll offset changing - float VerticalDrawOffset variable (default value is 0) - double TopScrollOffset and BottomScrollOffset variables
…p of cursor position formula
…if ContentVerticalScrollOffset property changed
…set management easier
…ing; Make TopScrollOffset and BottomScrollOffset field public for get Code refactor: - Move offset calculating logic to local function
Fixed bug: - When cursor located out of viewport local offset not applied to vertical scroll value
Owner
|
Looks pretty good. This problem always annoyed me as well, thanks for your fix🙏🏻. |
Owner
|
I refactored small parts of your code, but I spotted some problems. My changes are in a new pull request About the problems I found:
I will close this Pull request, lets continue from the new one for now. |
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.
Top and bottom offset for content
If this control will be used with some flyouts (like search-replace flyout) content offset may be useful
For example modern notepad application
I'm not good c# developer, but for a first look that works without any bugs. Also I worry about performance - my formulas may be not optimized
Make horizontal scrollbar usable
9cca937
Right now user can't normally edit line under scrollbar (If user enable "Always show scrollbars" in settings that line cannot be edited). If line is last editing is not possible.
How it look before
User can't access line 45
How it look after
User can access any line without problems