keyboard_widget: only use default widgets when determining top-left

main
Ilya Zhuravlev 2020-12-29 07:38:18 -05:00
parent d3cbf4f1fb
commit 75baeb28cd
1 changed files with 4 additions and 3 deletions

View File

@ -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: