diff options
| author | Jules Aguillon | 2022-02-27 15:23:36 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2022-02-27 15:23:36 +0100 |
| commit | 87144fd3a81a32e776beb85cae9046f715949995 (patch) | |
| tree | 4fc08dfb37755bdcecdd83b210e1718f8f1ba53f /srcs/juloo.keyboard2/Keyboard2View.java | |
| parent | f6d455466939e09c851e1afb95313ef8cf5fd344 (diff) | |
| download | unexpected-keyboard-87144fd3a81a32e776beb85cae9046f715949995.tar.gz unexpected-keyboard-87144fd3a81a32e776beb85cae9046f715949995.zip | |
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.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2View.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2View.java | 4 |
1 files changed, 2 insertions, 2 deletions
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; } } |
