FreakyAli / Maui.FreakyControls

FreakyControls is a free OSS UI Kit for .NET MAUI which provides a set of controls and utilities to build modern mobile apps.
MIT License
317 stars 39 forks source link

FreakyPinCodeControl sizing keyboardbuttons #119

Closed SE250880 closed 6 months ago

SE250880 commented 6 months ago

Hello! I´m using your "FreakyPinCodeControl" in an iOS app. I don´t know how to change the size of the keyboardbuttons and how to reduce the space between them. Can you show me an example?

grafik

FreakyAli commented 6 months ago

You have everything you need in the documentation, did you go through it?

https://github.com/FreakyAli/Maui.FreakyControls/wiki/FreakyPinCodeControl

SE250880 commented 6 months ago

Yes, I did, but ItemSpacing and KeyboardSizeRequest have no Effect?

FreakyAli commented 6 months ago

I just tried it out and it's not working, So I will try to see if I can find some time to fix this, But I am not 100% sure how soon I will look into it!

You can either wait or just copy the control to your app and make changes to it if this is urgent

FreakyAli commented 6 months ago

After looking into this further, I have rewritten the logic that controlled the keyboard & display of the buttons, now they will be evenly distributed based on the available space and will also fit the height available to the control, Also I have added two new properties that should let you control the HeightRequest and WidthRequest of the keyboard buttons if you are not happy with the existing logic changes and the SizeRequest property is now deprecated in favour of the new properties and will be removed in some future release.

Note: once you use these above-mentioned properties, the above-mentioned logic that decides the sizes of the buttons will get automatically disabled as it is part of a grid and the only way to enable it again would be to recreate the view.

More information here: https://github.com/FreakyAli/Maui.FreakyControls/pull/122/files

FreakyAli commented 6 months ago

Oh yeah FYI ItemSpacing is not for the keyboard but the pin code items, you should find a new property in the next release called KeyboardSpacing

SE250880 commented 6 months ago

Ok thanks, I will try this when the next nugetversion is released.

FreakyAli commented 6 months ago

Fixed in the latest pre-release

SE250880 commented 6 months ago

Ok thanks a lot. Is there also a possibilty to hide the cancel button or to set the size of this button separately? Since I can only set one text size for the keyboard, it is difficult to find a suitable size that fits the numbers and the cancel text. It would also be nice if the cancel button could have no text but an icon instead

FreakyAli commented 6 months ago

Is there also a possibility to hide the cancel button or to set the size of this button separately?

For now no, if this was something you needed you should've mentioned this in this or a separate bug.

Since I can only set one text size for the keyboard, it is difficult to find a suitable size that fits the numbers and the cancel text.

This is intentional for consistency.

it is difficult to find a suitable size that fits the numbers and the cancel text. It would also be nice if the cancel button could have no text but an icon instead

Raise a feature request and i might look into it