core: layout: resize bottom row according to main layout

In the Unexpected Keyboard, the bottom row always has the width of the
main layout despite being defined with a width of 10 units. Resize the
bottom row according to the main layout to improve layouts like
arab_pc.xml and numeric.xml.
This commit is contained in:
Richard Acayan 2024-09-26 19:32:38 -04:00
parent 253575febd
commit 1391589ce0

View file

@ -720,9 +720,9 @@ impl Layout {
for key in row { for key in row {
new_row.push(Key { new_row.push(Key {
parts: key.parts, parts: key.parts,
x1: key.x1, x1: key.x1 * layout.width / bottom_row.width,
y1: old_height + key.y1, y1: old_height + key.y1,
x2: key.x2, x2: key.x2 * layout.width / bottom_row.width,
y2: old_height + key.y2, y2: old_height + key.y2,
}); });
} }