From 75baeb28cdd5e4214f0f189b01db4832bf8408d6 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Tue, 29 Dec 2020 07:38:18 -0500 Subject: [PATCH] keyboard_widget: only use default widgets when determining top-left --- src/main/python/keyboard_widget.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/python/keyboard_widget.py b/src/main/python/keyboard_widget.py index 1f36110..c55a51a 100644 --- a/src/main/python/keyboard_widget.py +++ b/src/main/python/keyboard_widget.py @@ -146,9 +146,10 @@ class KeyboardWidget(QWidget): # find the global top-left position, all the keys will be shifted to the left/up by that position for key, cls in keys: - obj = cls(key) - top_x = min(top_x, obj.x) - top_y = min(top_y, obj.y) + if key.layout_index == -1: + obj = cls(key) + top_x = min(top_x, obj.x) + top_y = min(top_y, obj.y) # obtain common widgets, that is, ones which are always displayed and require no extra transforms for key, cls in keys: