diff options
| author | Jules Aguillon | 2024-05-29 11:59:54 +0200 |
|---|---|---|
| committer | GitHub | 2024-05-29 11:59:54 +0200 |
| commit | 1a290f96f26b848a217ee5db3d6d5920c7c38a27 (patch) | |
| tree | 575b7f70c389d6b5ed2fd0e789e2374d5f7ab3bf /srcs/juloo.keyboard2/Theme.java | |
| parent | 304375268d520687d41dc7834c442347d638da9c (diff) | |
| download | unexpected-keyboard-1a290f96f26b848a217ee5db3d6d5920c7c38a27.tar.gz unexpected-keyboard-1a290f96f26b848a217ee5db3d6d5920c7c38a27.zip | |
Configure anticircle gesture per-key (#644)
This adds the new 'anticircle' attribute to layouts '<key>' elements
that configure the key to send when doing a anti-clockwise circle
gesture on it.
Labels are drawn the same way as indication.
Updated docs.
Diffstat (limited to 'srcs/juloo.keyboard2/Theme.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Theme.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/srcs/juloo.keyboard2/Theme.java b/srcs/juloo.keyboard2/Theme.java index aedf33a..9eff44f 100644 --- a/srcs/juloo.keyboard2/Theme.java +++ b/srcs/juloo.keyboard2/Theme.java @@ -35,6 +35,7 @@ public class Theme private final Paint _keySubLabelPaint; private final Paint _specialKeySubLabelPaint; private final Paint _indicationPaint; + private final Paint _specialIndicationPaint; public Theme(Context context, AttributeSet attrs) { @@ -68,6 +69,7 @@ public class Theme _specialKeyLabelPaint = initLabelPaint(Paint.Align.CENTER, specialKeyFont); _specialKeySubLabelPaint = initLabelPaint(Paint.Align.LEFT, specialKeyFont); _indicationPaint = initLabelPaint(Paint.Align.CENTER, null); + _specialIndicationPaint = initLabelPaint(Paint.Align.CENTER, specialKeyFont); } public Paint labelPaint(boolean special_font) @@ -83,9 +85,9 @@ public class Theme return p; } - public Paint indicationPaint() + public Paint indicationPaint(boolean special_font) { - return _indicationPaint; + return special_font ? _specialIndicationPaint : _indicationPaint; } /** Interpolate the 'value' component toward its opposite by 'alpha'. */ |
