From 87144fd3a81a32e776beb85cae9046f715949995 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 27 Feb 2022 15:23:36 +0100 Subject: Reduce the text size for some keys The symbols are now smaller for Shift, Space, Backspace, Delete and some keys on the bottom row. The previous rule was to make the text smaller for symbols made of several characters. This is changed to a flag approach. --- srcs/juloo.keyboard2/Keyboard2View.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'srcs/juloo.keyboard2/Keyboard2View.java') diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java index b77568a..92630ca 100644 --- a/srcs/juloo.keyboard2/Keyboard2View.java +++ b/srcs/juloo.keyboard2/Keyboard2View.java @@ -319,7 +319,7 @@ public class Keyboard2View extends View private float scaleTextSize(KeyValue k, float rel_size, float keyH) { - float smaller_if_long = (k.symbol.length() < 2) ? 1.f : 0.75f; - return keyH * rel_size * smaller_if_long * _config.characterSize; + float smaller_font = ((k.flags & KeyValue.FLAG_SMALLER_FONT) == 0) ? 1.f : 0.75f; + return keyH * rel_size * smaller_font * _config.characterSize; } } -- cgit v1.2.3