-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Add scroll capacities to menu #122
Conversation
Codecov Report
@@ Coverage Diff @@
## master #122 +/- ##
=======================================
Coverage 84.30% 84.30%
=======================================
Files 27 27
Lines 3314 3314
=======================================
Hits 2794 2794
Misses 520 520 Continue to review full report at Codecov.
|
This pull request introduces 6 alerts when merging 857d36b into 0387712 - view on LGTM.com new alerts:
|
This pull request introduces 6 alerts when merging 37e80f0 into 0387712 - view on LGTM.com new alerts:
|
This pull request introduces 4 alerts when merging 250665b into 0387712 - view on LGTM.com new alerts:
|
This pull request introduces 4 alerts when merging f5ca803 into 0387712 - view on LGTM.com new alerts:
|
Tests failed on pygame 2.7 https://travis-ci.org/github/ppizarror/pygame-menu/jobs/672115273 |
This pull request introduces 4 alerts when merging 00485d7 into 0387712 - view on LGTM.com new alerts:
|
This pull request introduces 4 alerts when merging 12f5c17 into 0387712 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert and fixes 4 when merging 9afd200 into 0387712 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 4 when merging c50562a into 0387712 - view on LGTM.com new alerts:
fixed alerts:
|
Added fully column support. Also Added an option to center vertically the menus. |
pygameMenu/scrollarea.py
Outdated
@@ -297,6 +297,20 @@ def get_view_rect(self): | |||
|
|||
return rect | |||
|
|||
def get_actual_scrollbar_thickness(self, orientation): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming get_scrollbar_thickness
is enough , no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's better
@anxuae. There's an inconsistency in After the y scrollbar returns to the first position. In the test I made (see gif) at first the margin is valid (added https://i.imgur.com/KXUOohR.gif PD: Not deleted, but it should return to the first state drawn |
This pull request introduces 1 alert and fixes 4 when merging b9f9fe7 into 0387712 - view on LGTM.com new alerts:
fixed alerts:
|
pygameMenu/scrollarea.py
Outdated
:return: Thickness in px | ||
:rtype: int | ||
""" | ||
if orientation == _locals.ORIENTATION_HORIZONTAL and self._world.get_width() > self._rect.width or \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition self._world.get_width() > self._rect.width
is not enough (there are some specific cases when world size is close to area size)
Use get_hidden_width() == 0
or get_hidden_height() == 0
to know if scrollbars are displayed or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed!
Fixed ;-) |
This pull request introduces 1 alert and fixes 4 when merging a6a66c6 into 0387712 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 4 when merging b02de13 into 0387712 - view on LGTM.com new alerts:
fixed alerts:
|
As menu has more parameters, I renamed |
Also renamed |
Introduced also a migration guide: https://github.com/ppizarror/pygame-menu/wiki/Migration-Guide |
Hi @ppizarror , just a question, how do you add your own commit to my PR? |
Just use github for windows and vscode. Maybe b/c I have the permissions of |
I think this PR is way too large. I'm gonna merge it, if you want to change anything please create another PR. Thanks!! |
This is the full implementation of #15.