From be9624bbddae049ad8ad66eacdaa4d4f89ec0f5f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 2 May 2025 08:11:49 +0530 Subject: [PATCH] Fix px suffix for lines/columns not working --- glfw/wl_window.c | 2 +- kittens/quick_access_terminal/main.go | 4 ++-- kittens/quick_access_terminal/main.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/glfw/wl_window.c b/glfw/wl_window.c index a0bf8e4cc..5413efb9a 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -1069,9 +1069,9 @@ calculate_layer_size(_GLFWwindow *window, uint32_t *width, uint32_t *height) { if (!*height) *height = monitor_height; return; } - debug("Calculating layer shell window size at scale: %f\n", xscale); const unsigned xsz = config->x_size_in_pixels ? (unsigned)(config->x_size_in_pixels * xscale) : (cell_width * config->x_size_in_cells); const unsigned ysz = config->y_size_in_pixels ? (unsigned)(config->y_size_in_pixels * yscale) : (cell_height * config->y_size_in_cells); + debug("Calculating layer shell window size at scale: %f cell_size: %u %u sz: %u %u\n", xscale, cell_width, cell_height, xsz, ysz); if (config->edge == GLFW_EDGE_LEFT || config->edge == GLFW_EDGE_RIGHT) { if (!*height) *height = monitor_height; double spacing = spacing_x; diff --git a/kittens/quick_access_terminal/main.go b/kittens/quick_access_terminal/main.go index 6d5d80523..be9ba1727 100644 --- a/kittens/quick_access_terminal/main.go +++ b/kittens/quick_access_terminal/main.go @@ -37,8 +37,8 @@ func main(cmd *cli.Command, opts *Options, args []string) (rc int, err error) { return 1, err } argv := []string{kitty_exe, "+kitten", "panel", "--toggle-visibility", "--exclusive-zone=0", "--override-exclusive-zone", "--layer=overlay", "--single-instance"} - argv = append(argv, fmt.Sprintf("--lines=%d", conf.Lines)) - argv = append(argv, fmt.Sprintf("--columns=%d", conf.Columns)) + argv = append(argv, fmt.Sprintf("--lines=%s", conf.Lines)) + argv = append(argv, fmt.Sprintf("--columns=%s", conf.Columns)) argv = append(argv, fmt.Sprintf("--edge=%s", conf.Edge)) if conf.Margin_top != 0 { argv = append(argv, fmt.Sprintf("--margin-top=%d", conf.Margin_top)) diff --git a/kittens/quick_access_terminal/main.py b/kittens/quick_access_terminal/main.py index 553700cc9..52052aa27 100644 --- a/kittens/quick_access_terminal/main.py +++ b/kittens/quick_access_terminal/main.py @@ -19,13 +19,13 @@ opt = definition.add_option agr('qat', 'Window appearance') -opt('lines', '25', option_type='positive_int', +opt('lines', '25', long_text=''' The number of lines shown in the window, when the window is along the top or bottom edges of the screen. If it has the suffix :code:`px` then it sets the height of the window in pixels instead of lines. ''',) -opt('columns', '80', option_type='positive_int', +opt('columns', '80', long_text=''' The number of columns shown in the window, when the window is along the left or right edges of the screen. If it has the suffix :code:`px` then it sets the width of the window in pixels instead of columns.