fix(web): osk shrinkage from rounding

This commit is contained in:
jahorton 2022-05-25 15:12:25 +07:00
parent 128e557ab8
commit 2f1237e352
2 changed files with 4 additions and 4 deletions

View file

@ -62,7 +62,7 @@ namespace com.keyman.osk {
protected postKeyboardLoad() {
// Initializes the size of a touch keyboard.
if(this.vkbd && this.device.touchable) {
let targetOSKHeight = this.vkbd.computedAdjustedOskHeight(this.getDefaultKeyboardHeight());
let targetOSKHeight = this.getDefaultKeyboardHeight();
this.setSize(this.getDefaultWidth(), targetOSKHeight + this.banner.height);
}

View file

@ -366,7 +366,7 @@ namespace com.keyman.osk {
* of alternate keystroke sequences.
* @param input The input coordinate of the event that led to use of this function
* @param keySpec The spec of the key directly triggered by the input event. May be for a subkey.
* @returns
* @returns
*/
getTouchProbabilities(input: InputEventCoordinate, keySpec?: keyboards.ActiveKey): text.KeyDistribution {
let keyman = com.keyman.singleton;
@ -1235,9 +1235,9 @@ namespace com.keyman.osk {
let b = this.layerGroup.element as HTMLElement;
let gs = this.kbdDiv.style;
let bs = b.style;
if (this.usesFixedHeightScaling) {
if (this.usesFixedHeightScaling && this.height) {
// Sets the layer group to the correct height.
gs.height = gs.maxHeight = paddedHeight + 'px';
gs.height = gs.maxHeight = this.height + 'px';
}
// The font-scaling applied on the layer group.