mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-07 09:38: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);
|
setScrollerBucketSize((int) baseSize);
|
||||||
|
|
||||||
squareSpacing = UIHelper.dpToPixels(getContext(), 1.0f);
|
squareSpacing = UIHelper.dpToPixels(getContext(), 1.0f);
|
||||||
float minTextSize = getResources().getDimension(R.dimen.tinyTextSize);
|
|
||||||
float maxTextSize = getResources().getDimension(R.dimen.regularTextSize);
|
float maxTextSize = getResources().getDimension(R.dimen.regularTextSize);
|
||||||
float textSize = height * 0.045f;
|
float textSize = height * 0.06f;
|
||||||
textSize = Math.max(Math.min(textSize, maxTextSize), minTextSize);
|
textSize = Math.min(textSize, maxTextSize);
|
||||||
|
|
||||||
pSquareFg.setTextSize(textSize);
|
pSquareFg.setTextSize(textSize);
|
||||||
pTextHeader.setTextSize(textSize);
|
pTextHeader.setTextSize(textSize);
|
||||||
|
|||||||
@@ -151,10 +151,9 @@ public class HabitScoreView extends ScrollableDataView implements HabitDataView
|
|||||||
{
|
{
|
||||||
if(height < 9) height = 200;
|
if(height < 9) height = 200;
|
||||||
|
|
||||||
float minTextSize = getResources().getDimension(R.dimen.tinyTextSize);
|
float maxTextSize = getResources().getDimension(R.dimen.tinyTextSize);
|
||||||
float maxTextSize = getResources().getDimension(R.dimen.regularTextSize);
|
float textSize = height * 0.06f;
|
||||||
float textSize = height * 0.045f;
|
pText.setTextSize(Math.min(textSize, maxTextSize));
|
||||||
pText.setTextSize(Math.max(Math.min(textSize, maxTextSize), minTextSize));
|
|
||||||
em = pText.getFontSpacing();
|
em = pText.getFontSpacing();
|
||||||
|
|
||||||
footerHeight = (int)(3 * em);
|
footerHeight = (int)(3 * em);
|
||||||
|
|||||||
Reference in New Issue
Block a user