GreatApo / GreatFit

Amazfit APK watchface sources with many additional features and settings
MIT License
116 stars 54 forks source link

Centered text cropped in slpt view #37

Closed fgrassmann closed 5 years ago

fgrassmann commented 5 years ago

In SLPT view, if the text is not aligned to the left, you draw a rectangle around it, for example (WeatherWidget):

if(!settings.temperatureAlignLeft) { // If text is centered, set rectangle temperatureLayout.setRect( (int) (2 * tmp_left + 640), (int) (settings.temperatureFontSize) ); tmp_left = -320; }

At least if you use a font_ratio above 100 (which is necessary with the font I use), this rectangle is too small and cuts the bottom part of the font. Changing the height to

(int) (((float)settings.font_ratio/100)*settings.temperatureFontSize)

somewhat relaxes the situation, although it is still not high enough. Maybe adding some extra space would be helpful.

GreatApo commented 5 years ago

The box is there to hack the way around a center alignment. Thanks for pointing it out.

GreatApo commented 5 years ago

Implemented: commit 0646192104cf3cef94468b6dd06261fbe9ed0bf9