forked from extern/Unexpected-Keyboard
Don't elide label of non-string keys
Several non-string keys can have a large label that shouldn't be elided, for example ctrl, meta, send. Also, change the cutoff to 3 characters as labels are easily colliding.
This commit is contained in:
parent
eeae964ae6
commit
21316b77d7
@ -408,7 +408,11 @@ public class Keyboard2View extends View
|
||||
else
|
||||
x += (a == Paint.Align.LEFT) ? subPadding : keyW - subPadding;
|
||||
String label = kv.getString();
|
||||
canvas.drawText(label, 0, Math.min(4, label.length()), x, y, p);
|
||||
int label_len = label.length();
|
||||
// Limit the label of string keys to 3 characters
|
||||
if (label_len > 3 && kv.getKind() == KeyValue.Kind.String)
|
||||
label_len = 3;
|
||||
canvas.drawText(label, 0, label_len, x, y, p);
|
||||
}
|
||||
|
||||
private void drawIndication(Canvas canvas, String indication, float x,
|
||||
|
Loading…
Reference in New Issue
Block a user