mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Remove minTextSize
This was causing problems, since some launchers completely ignore minimum widget sizes. When widgets were too small, the text started to overflow.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user