PojavLauncher
PojavLauncher copied to clipboard
New feature: button's text size changing + text size in DIP instead of SP
What this PR adds / changes / implements:
-
Adds
textSizefield toControlDataclass -
Changes one of the
ControlDataconstructors so it sets the text size to 14 DIP by default. -
Adds several methods to the
Toolsclass for converting PX, DP, and SP screen units between themselves. They are not currently in use, but may be needed in the future (really idk why i added it, maybe i planned to use it somewhere but forgot where exactly). -
Implements text size section in
dialog_control_button_setting.xmlafter size section so user can dynamically change it, the same way like he changes opacity or corner radius button properties. -
Sets the min and max values of
textSize's SeekBar to 8 and 24 respectively. At this moment, values are hardcoded. -
Impements
setDPText()method in classEditControlPopupfor displaying current text size according to its SeekBar and implements its ChangeListener. -
Adds string "Text size" to
strings.xmlwith namecustomctrl_text_size.
Hello, and thank you for this PR :smile: At first glance the PR seems good and fits the general code style, I'll take a deeper look at it later.
However, using SP is important, as it scales properly for users who need a bigger front size. (accessibility settings) DO NOT use anything not backed by the SP unit when it comes to fonts.
Forgotten by everyone, go into the void...
No, not really.