From 1391589ce0d778c3fc2dc07e1e94b1a0bf097679 Mon Sep 17 00:00:00 2001 From: Richard Acayan Date: Thu, 26 Sep 2024 19:32:38 -0400 Subject: [PATCH] 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. --- src/core/layout.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/layout.rs b/src/core/layout.rs index 894b833..347e639 100644 --- a/src/core/layout.rs +++ b/src/core/layout.rs @@ -720,9 +720,9 @@ impl Layout { for key in row { new_row.push(Key { parts: key.parts, - x1: key.x1, + x1: key.x1 * layout.width / bottom_row.width, y1: old_height + key.y1, - x2: key.x2, + x2: key.x2 * layout.width / bottom_row.width, y2: old_height + key.y2, }); }