Skip to content
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

Illustrates #2331 (Scrollview not respecting clip) does not reproduce #2332

Merged
merged 16 commits into from Feb 20, 2023

Conversation

BDisp
Copy link
Collaborator

@BDisp BDisp commented Feb 8, 2023

Unit test for #2331 - I think there is some issue on how the user is drawing the CustomButton. As you can see in the unit test none of the CustomButton over-spill the ScrollView.

Pull Request checklist:

  • I've named my PR in the form of "Fixes #issue. Terse description."
  • My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit CTRL-K-D to automatically reformat your files before committing.
  • My code follows the Terminal.Gui library design guidelines
  • I ran dotnet test before commit
  • I have made corresponding changes to the API documentation (using /// style comments)
  • My changes generate no new warnings
  • [x ] I have checked my code and corrected any poor grammar or misspellings
  • I conducted basic QA to assure all features are working

@BDisp BDisp marked this pull request as draft February 8, 2023 23:26
@tig tig changed the title Proves that the issue #2331 don't have reason to happen. Illustrates #2331 (Scrollview not respecting clip) does not reproduce Feb 9, 2023
@BDisp BDisp marked this pull request as ready for review February 13, 2023 00:25
@BDisp
Copy link
Collaborator Author

BDisp commented Feb 13, 2023

There is still a bug on this issue and this PR fixes it. If you run the ScrollViewTests you'll verify it will fail without the fix. So, the cause of the bug was if the sum of the left+width-1 or the top+height-1 are less or equal to zero, then there will no available space to draw, but it was drawing.

@tig tig merged commit c85ff95 into gui-cs:develop Feb 20, 2023
@BDisp BDisp deleted the custombutton-on-scrollview_2331 branch February 20, 2023 14:56
tig added a commit to tig/Terminal.Gui that referenced this pull request Feb 20, 2023
tig added a commit that referenced this pull request Feb 21, 2023
#2372)

* Illustrates #2331 (Scrollview not respecting clip) does not reproduce (#2332)

* Proves that the issue #2331 don't have reason to happen.

* fixes #2336

* Fixes #2331. ScrollView may not be honoring clip region; CustomButton shows outside

* More appropriate solution for the issue #2331.

* Start refactoring LineCanvas for mixing line style support (e.g. double into single)

* Add remaining resolvers

* Implement corner border style mixing in LineCanvas

* Refactor and simplify resolvers

* Move tests to Core folder and namespace to Terminal.Gui.CoreTests

* Fixes #2333. TextField is selecting badly a word on double click.

* Add unit test deleting a word with accented char.

* Fixes 2331. ScrollView may not be honoring clip region.

* Add a custom button scenario.

* Fixes #2350. Clipping broke (see Clipping scenario).

* Is preferable use NeedDisplay instead of Bounds.

---------

Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
Co-authored-by: tznind <tznind@dundee.ac.uk>

* Fixes ASCIICustomButton scenario.

* Adds Snake Scenario (#2353)

* Add empty snake scenario

* Move snake head around

* Snake now has a tail

* Rest of logic implementation

* Ctrl K D layout fixes

* Game gets faster as you collect more apples

* Adjust speed increase rate down

* Use white on black for snake and border and red for apple

* Fix ScenarioTests not Disposing Scenario

* Add disposes and fix to use LineCanvas.GenerateImage

* Fix stack overflow, doh!

---------

Co-authored-by: Tig <tig@users.noreply.github.com>

* Fixes 2368. Nested views with height of 1 not rendering correctly.

---------

Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
Co-authored-by: tznind <tznind@dundee.ac.uk>
Co-authored-by: Thomas Nind <31306100+tznind@users.noreply.github.com>
BDisp pushed a commit to BDisp/Terminal.Gui that referenced this pull request Feb 27, 2023
BDisp added a commit to BDisp/Terminal.Gui that referenced this pull request Feb 27, 2023
BDisp added a commit to BDisp/Terminal.Gui that referenced this pull request Mar 1, 2023
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.

None yet

3 participants