Remove minTextSize

This was causing problems, since some launchers completely
ignore minimum widget sizes. When widgets were too small,
the text started to overflow.
pull/114/merge
Alinson S. Xavier 10 years ago
parent 83ca136346
commit 23466523df

@ -134,10 +134,9 @@ public class HabitHistoryView extends ScrollableDataView implements HabitDataVie
setScrollerBucketSize((int) baseSize);
squareSpacing = UIHelper.dpToPixels(getContext(), 1.0f);
float minTextSize = getResources().getDimension(R.dimen.tinyTextSize);
float maxTextSize = getResources().getDimension(R.dimen.regularTextSize);
float textSize = height * 0.045f;
textSize = Math.max(Math.min(textSize, maxTextSize), minTextSize);
float textSize = height * 0.06f;
textSize = Math.min(textSize, maxTextSize);
pSquareFg.setTextSize(textSize);
pTextHeader.setTextSize(textSize);

@ -151,10 +151,9 @@ public class HabitScoreView extends ScrollableDataView implements HabitDataView
{
if(height < 9) height = 200;
float minTextSize = getResources().getDimension(R.dimen.tinyTextSize);
float maxTextSize = getResources().getDimension(R.dimen.regularTextSize);
float textSize = height * 0.045f;
pText.setTextSize(Math.max(Math.min(textSize, maxTextSize), minTextSize));
float maxTextSize = getResources().getDimension(R.dimen.tinyTextSize);
float textSize = height * 0.06f;
pText.setTextSize(Math.min(textSize, maxTextSize));
em = pText.getFontSpacing();
footerHeight = (int)(3 * em);

Loading…
Cancel
Save