From 23685ddb3c7a4a9a0c757a12330b4cf45aa0707e Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 27 Feb 2022 01:50:24 +0100 Subject: Compute text size relative to key height Instead of a fixed size that don't work at all for bigger screens. Other tweaks: - Use the value-land dimens to vary 'extra_horizontal_margin' - Move label size to Config, because it can change at runtime (rotation) - Slightly decrease the size of "long" symbols --- srcs/juloo.keyboard2/Theme.java | 6 ------ 1 file changed, 6 deletions(-) (limited to 'srcs/juloo.keyboard2/Theme.java') diff --git a/srcs/juloo.keyboard2/Theme.java b/srcs/juloo.keyboard2/Theme.java index 52147d9..3d57fe7 100644 --- a/srcs/juloo.keyboard2/Theme.java +++ b/srcs/juloo.keyboard2/Theme.java @@ -16,9 +16,6 @@ public class Theme public final int labelColor; public final int subLabelColor; - public final float labelTextSize; - public final float sublabelTextSize; - public final float keyBorderRadius; private final Paint _keyLabelPaint; @@ -38,9 +35,6 @@ public class Theme subLabelColor = s.getColor(R.styleable.keyboard_colorSubLabel, 0); keyBorderRadius = s.getDimension(R.styleable.keyboard_keyBorderRadius, 0); s.recycle(); - Resources res = context.getResources(); - labelTextSize = res.getDimension(R.dimen.label_text_size); - sublabelTextSize = res.getDimension(R.dimen.sublabel_text_size); _keyLabelPaint = initLabelPaint(Paint.Align.CENTER, null); _keySubLabelPaint = initLabelPaint(Paint.Align.LEFT, null); Typeface specialKeyFont = getSpecialKeyFont(context); -- cgit v1.2.3