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

Feature: half page scrolling #774

Merged
merged 4 commits into from
Aug 14, 2022
Merged

Feature: half page scrolling #774

merged 4 commits into from
Aug 14, 2022

Conversation

ViridiFox
Copy link
Contributor

@ViridiFox ViridiFox commented Jul 30, 2022

Description

adds Ctrl-u/Ctrl-d for scrolling half a page

Issue

Closes: #765

Testing

If relevant, please state how this was tested. All changes must be tested to work:

Please also indicate which platforms were tested. All platforms directly affected by the change must be tested:

  • Windows
  • macOS
  • Linux

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts

@ViridiFox ViridiFox changed the title Feature half page scrolling Feature: half page scrolling Jul 30, 2022
@ViridiFox
Copy link
Contributor Author

Is there a way to get the height of the dialog, to be able to calculate half a page?

@ViridiFox ViridiFox marked this pull request as ready for review July 30, 2022 19:00
@ClementTsang
Copy link
Owner

Is there a way to get the height of the dialog, to be able to calculate half a page?

Not yet off the top of my head, would have to store that somewhere when drawn, which is something I wanted to do in the future for stuff outside of just widgets.

@ClementTsang
Copy link
Owner

Sorry for the delay btw, I'll try to review once I get internet up where I am.

@codecov-commenter
Copy link

Codecov Report

Merging #774 (4a726ce) into master (2e0771d) will decrease coverage by 0.08%.
The diff coverage is 1.81%.

@@            Coverage Diff             @@
##           master     #774      +/-   ##
==========================================
- Coverage   24.12%   24.04%   -0.09%     
==========================================
  Files          60       60              
  Lines       12982    13030      +48     
==========================================
+ Hits         3132     3133       +1     
- Misses       9850     9897      +47     
Impacted Files Coverage Δ
src/app.rs 0.04% <0.00%> (-0.01%) ⬇️
src/canvas/dialogs/help_dialog.rs 0.00% <0.00%> (ø)
src/constants.rs 0.00% <ø> (ø)
src/lib.rs 6.94% <0.00%> (-0.03%) ⬇️
src/app/states.rs 61.43% <100.00%> (+0.25%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ClementTsang
Copy link
Owner

LGTM for the most part. I added an extra field to track the height and fixed a tiny bug with menu scrolling sometimes overshooting (the name max_scroll_index is a bit misleading, I'll fix that in a future commit).

@all-contributors please add @ViridiCanis for code

@allcontributors
Copy link
Contributor

@ClementTsang

I've put up a pull request to add @ViridiCanis! 🎉

@ClementTsang ClementTsang merged commit 5da7411 into ClementTsang:master Aug 14, 2022
@ClementTsang ClementTsang mentioned this pull request Aug 14, 2022
5 tasks
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.

ctrl+d / ctrl+u to scroll half a page
3 participants