mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Enforce min text size on HabitScoreView
This commit is contained in:
@@ -156,8 +156,10 @@ public class HabitScoreView extends ScrollableDataView implements HabitDataView
|
||||
{
|
||||
if(height < 9) height = 200;
|
||||
|
||||
int maxTextSize = getResources().getDimensionPixelSize(R.dimen.regularTextSize);
|
||||
pText.setTextSize(Math.min(height * 0.047f, maxTextSize));
|
||||
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));
|
||||
em = pText.getFontSpacing();
|
||||
|
||||
footerHeight = (int)(3 * em);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<dimen name="history_max_font_size">@dimen/regularTextSize</dimen>
|
||||
<dimen name="regularTextSize">16sp</dimen>
|
||||
<dimen name="smallTextSize">14sp</dimen>
|
||||
<dimen name="tinyTextSize">12sp</dimen>
|
||||
<dimen name="tinyTextSize">10sp</dimen>
|
||||
<dimen name="habitNameWidth">160dp</dimen>
|
||||
|
||||
<string-array name="snooze_interval_names">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
android:minHeight="80dp"
|
||||
android:minWidth="80dp"
|
||||
android:minResizeWidth="40dp"
|
||||
android:minResizeHeight="40dp"
|
||||
android:minResizeHeight="80dp"
|
||||
android:initialLayout="@layout/widget_graph"
|
||||
android:previewImage="@drawable/widget_preview_score"
|
||||
android:resizeMode="vertical|horizontal"
|
||||
|
||||
Reference in New Issue
Block a user