From 1a290f96f26b848a217ee5db3d6d5920c7c38a27 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Wed, 29 May 2024 11:59:54 +0200 Subject: Configure anticircle gesture per-key (#644) This adds the new 'anticircle' attribute to layouts '' 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.--- srcs/juloo.keyboard2/Theme.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'srcs/juloo.keyboard2/Theme.java') 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'. */ -- cgit v1.2.3