From ef39ecd1b77feeba9cbe978c7431d0f9ce40010d Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 8 Jul 2023 00:08:13 +1000 Subject: Adjust width requirement for big enter (#21470) --- keyboards/gvalchca/spaccboard/info.json | 2 +- keyboards/handwired/frenchdev/info.json | 12 ++++++------ keyboards/handwired/t111/info.json | 2 +- lib/python/qmk/keyboard.py | 16 ++++++++-------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/keyboards/gvalchca/spaccboard/info.json b/keyboards/gvalchca/spaccboard/info.json index 71c88a0db0..1ce128b596 100644 --- a/keyboards/gvalchca/spaccboard/info.json +++ b/keyboards/gvalchca/spaccboard/info.json @@ -201,7 +201,7 @@ {"matrix": [2, 9], "x": 9.75, "y": 2}, {"matrix": [2, 10], "x": 10.75, "y": 2}, {"matrix": [2, 11], "x": 11.75, "y": 2}, - {"matrix": [2, 13], "x": 12.75, "y": 1, "w": 2.25, "h": 2}, + {"matrix": [2, 13], "x": 13.5, "y": 1, "w": 1.5, "h": 2}, {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, {"matrix": [3, 2], "x": 2.25, "y": 3}, diff --git a/keyboards/handwired/frenchdev/info.json b/keyboards/handwired/frenchdev/info.json index d5981aebd4..a22b06d417 100644 --- a/keyboards/handwired/frenchdev/info.json +++ b/keyboards/handwired/frenchdev/info.json @@ -116,15 +116,15 @@ {"matrix": [1, 0], "x": 18, "y": 5.9}, {"matrix": [0, 0], "x": 19, "y": 5.9}, - {"matrix": [8, 3], "x": 2.25, "y": 7.5, "w": 1.5, "h": 2}, - {"matrix": [8, 4], "x": 3.75, "y": 7.5, "w": 1.5, "h": 2}, + {"matrix": [8, 3], "x": 2.25, "y": 7.5, "w": 1.75, "h": 2}, + {"matrix": [8, 4], "x": 4, "y": 7.5, "w": 1.75, "h": 2}, - {"matrix": [8, 5], "x": 5.25, "y": 7.5, "w": 1.5, "h": 2}, + {"matrix": [8, 5], "x": 5.75, "y": 7.5, "w": 1.75, "h": 2}, - {"matrix": [7, 3], "x": 13.25, "y": 7.5, "w": 1.5, "h": 2}, - {"matrix": [7, 4], "x": 14.75, "y": 7.5, "w": 1.5, "h": 2}, + {"matrix": [7, 3], "x": 12.5, "y": 7.5, "w": 1.75, "h": 2}, + {"matrix": [7, 4], "x": 14.25, "y": 7.5, "w": 1.75, "h": 2}, - {"matrix": [7, 5], "x": 16.25, "y": 7.5, "w": 1.5, "h": 2} + {"matrix": [7, 5], "x": 16, "y": 7.5, "w": 1.75, "h": 2} ] } } diff --git a/keyboards/handwired/t111/info.json b/keyboards/handwired/t111/info.json index f4ecf44eab..f25b079098 100644 --- a/keyboards/handwired/t111/info.json +++ b/keyboards/handwired/t111/info.json @@ -96,7 +96,7 @@ {"matrix": [2, 10], "x": 10.75, "y": 3.5}, {"matrix": [3, 10], "x": 11.75, "y": 3.5}, {"matrix": [4, 10], "x": 12.75, "y": 3.5}, - {"matrix": [5, 10], "x": 13.75, "y": 2.5, "w": 1.5, "h": 2}, + {"matrix": [5, 10], "x": 13.75, "y": 2.5, "w": 1.25, "h": 2}, {"matrix": [6, 10], "x": 15.5, "y": 3.5}, {"matrix": [7, 10], "x": 16.5, "y": 3.5}, diff --git a/lib/python/qmk/keyboard.py b/lib/python/qmk/keyboard.py index 0c980faf2b..235b62640c 100644 --- a/lib/python/qmk/keyboard.py +++ b/lib/python/qmk/keyboard.py @@ -182,7 +182,7 @@ def render_layout(layout_data, render_ascii, key_labels=None): if x >= 0.25 and w == 1.25 and h == 2: render_key_isoenter(textpad, x, y, w, h, label, style) - elif w == 2.25 and h == 2: + elif w == 1.5 and h == 2: render_key_baenter(textpad, x, y, w, h, label, style) else: render_key_rect(textpad, x, y, w, h, label, style) @@ -275,7 +275,7 @@ def render_key_baenter(textpad, x, y, w, h, label, style): w = ceil(w * 4) h = ceil(h * 3) - label_len = w - 2 + label_len = w + 1 label_leftover = label_len - len(label) if len(label) > label_len: @@ -292,9 +292,9 @@ def render_key_baenter(textpad, x, y, w, h, label, style): lab_line = array('u', box_chars['v'] + label_middle + box_chars['v']) bot_line = array('u', box_chars['bl'] + label_border_bottom + box_chars['br']) - textpad[y][x + 3:x + w] = top_line - textpad[y + 1][x + 3:x + w] = mid_line - textpad[y + 2][x + 3:x + w] = mid_line - textpad[y + 3][x:x + w] = crn_line - textpad[y + 4][x:x + w] = lab_line - textpad[y + 5][x:x + w] = bot_line + textpad[y][x:x + w] = top_line + textpad[y + 1][x:x + w] = mid_line + textpad[y + 2][x:x + w] = mid_line + textpad[y + 3][x - 3:x + w] = crn_line + textpad[y + 4][x - 3:x + w] = lab_line + textpad[y + 5][x - 3:x + w] = bot_line -- cgit v1.2.3