mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-06-20 17:57:52 +02:00
Remove labels for the anti-clockwise circle gesture
These labels are often unwanted and easily collide with other labels.
This commit is contained in:
parent
0d5954cc3a
commit
52af262e16
@ -493,32 +493,12 @@ public class Keyboard2View extends View
|
||||
private void drawIndication(Canvas canvas, KeyboardData.Key k, float x,
|
||||
float y, float keyW, float keyH)
|
||||
{
|
||||
boolean special_font = false;
|
||||
String indic;
|
||||
int indic_length;
|
||||
float text_size;
|
||||
if (k.indication != null)
|
||||
{
|
||||
indic = k.indication;
|
||||
indic_length = indic.length();
|
||||
text_size = keyH * _config.sublabelTextSize * _config.characterSize;
|
||||
}
|
||||
else if (k.anticircle != null)
|
||||
{
|
||||
indic = k.anticircle.getString();
|
||||
// 3 character limit like regular labels
|
||||
indic_length = Math.min(indic.length(), 3);
|
||||
special_font = k.anticircle.hasFlagsAny(KeyValue.FLAG_KEY_FONT);
|
||||
text_size = scaleTextSize(k.anticircle, _config.sublabelTextSize, keyH);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (k.indication == null || k.indication.equals(""))
|
||||
return;
|
||||
}
|
||||
Paint p = _theme.indicationPaint(special_font);
|
||||
Paint p = _theme.indicationPaint(false);
|
||||
p.setColor(_theme.subLabelColor);
|
||||
p.setTextSize(text_size);
|
||||
canvas.drawText(indic, 0, indic_length,
|
||||
p.setTextSize(keyH * _config.sublabelTextSize * _config.characterSize);
|
||||
canvas.drawText(k.indication, 0, k.indication.length(),
|
||||
x + keyW / 2f, (keyH - p.ascent() - p.descent()) * 4/5 + y, p);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user