GreatApo/GreatFit

Centered text cropped in slpt view

Closed this issue · 2 comments

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.

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

Implemented: commit 0646192