abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Keyboard2View.java
diff options
context:
space:
mode:
authorJules Aguillon2023-03-05 23:08:35 +0100
committerJules Aguillon2023-03-05 23:08:35 +0100
commit18d3fd3c84db1903b3ea868e3a2fa0f5e837e236 (patch)
treea7d0b5e077c49b17228b01a7b0a27cfb81597cd1 /srcs/juloo.keyboard2/Keyboard2View.java
parentc56ad425f671d07e505cf0e63985abf8499635cc (diff)
downloadunexpected-keyboard-18d3fd3c84db1903b3ea868e3a2fa0f5e837e236.tar.gz
unexpected-keyboard-18d3fd3c84db1903b3ea868e3a2fa0f5e837e236.zip
Refactor: Remove KeyboardData.Corner
The Corner class is removed. The "localized" flag for all the corners is held in a bitfield.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2View.java')
-rw-r--r--srcs/juloo.keyboard2/Keyboard2View.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java
index 0a75529..cb93b3a 100644
--- a/srcs/juloo.keyboard2/Keyboard2View.java
+++ b/srcs/juloo.keyboard2/Keyboard2View.java
@@ -370,9 +370,9 @@ public class Keyboard2View extends View
return sublabel ? _theme.subLabelColor : _theme.labelColor;
}
- private void drawLabel(Canvas canvas, KeyboardData.Corner k, float x, float y, float keyH, boolean isKeyDown)
+ private void drawLabel(Canvas canvas, KeyValue kv, float x, float y, float keyH, boolean isKeyDown)
{
- KeyValue kv = KeyModifier.modify(k.kv, _mods);
+ kv = KeyModifier.modify(kv, _mods);
if (kv == null)
return;
float textSize = scaleTextSize(kv, _config.labelTextSize, keyH);
@@ -383,12 +383,12 @@ public class Keyboard2View extends View
canvas.drawText(kv.getString(), x, (keyH - p.ascent() - p.descent()) / 2f + y, p);
}
- private void drawSubLabel(Canvas canvas, KeyboardData.Corner k, float x,
- float y, float keyW, float keyH, int sub_index, boolean isKeyDown)
+ private void drawSubLabel(Canvas canvas, KeyValue kv, float x, float y,
+ float keyW, float keyH, int sub_index, boolean isKeyDown)
{
Paint.Align a = LABEL_POSITION_H[sub_index];
Vertical v = LABEL_POSITION_V[sub_index];
- KeyValue kv = KeyModifier.modify(k.kv, _mods);
+ kv = KeyModifier.modify(kv, _mods);
if (kv == null)
return;
float textSize = scaleTextSize(kv, _config.sublabelTextSize, keyH);