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

Add cursor size for text input #314

Merged
merged 6 commits into from
Apr 2, 2021
Merged

Conversation

mrkprdo
Copy link

@mrkprdo mrkprdo commented Apr 1, 2021

I am working on textinput for small screens, while i am using textinput font size 15, the cursor is not following the size.
Hence added an option to declare cursor size.

@codecov
Copy link

codecov bot commented Apr 1, 2021

Codecov Report

Merging #314 (bc798a0) into master (94c7d50) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #314   +/-   ##
=======================================
  Coverage   94.67%   94.68%           
=======================================
  Files          45       45           
  Lines       10614    10623    +9     
=======================================
+ Hits        10049    10058    +9     
  Misses        565      565           
Impacted Files Coverage Δ
pygame_menu/_widgetmanager.py 97.82% <ø> (ø)
pygame_menu/widgets/widget/textinput.py 81.51% <100.00%> (+0.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 94c7d50...bc798a0. Read the comment docs.

@ppizarror
Copy link
Owner

I've added some tests, and fixed some typing issues. Thanks :)

@ppizarror
Copy link
Owner

I was wondering why cursor_size must be in *args rather than **kwargs. As you can see, most of the **kwargs parameters modify the style of each widget

@mrkprdo
Copy link
Author

mrkprdo commented Apr 2, 2021

I thought of that too. But considering in type_input class, most if not all cursor_* styling are in args.
If you think this as otherwise, you can go ahead and change it. :)

@ppizarror
Copy link
Owner

yep, maybe in further versions of this gui the parameters could me moved to kwargs, anyway it does not break any compatibility,
thanks

@ppizarror ppizarror merged commit da5cc89 into ppizarror:master Apr 2, 2021
@ppizarror
Copy link
Owner

the new version 4.0.2 will be published today

@mrkprdo
Copy link
Author

mrkprdo commented Apr 3, 2021

Awesome. Thanks

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.

2 participants