From 614416d4b04ad1b3238919c34e17de95de5ff8de Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 3 Jun 2019 20:37:36 +0530 Subject: [PATCH] Fix positioning of text in the panel kitten --- docs/changelog.rst | 3 +++ kitty/glfw.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index c65e4286f..70eae29fb 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -19,6 +19,9 @@ To update |kitty|, :doc:`follow the instructions `. - macOS: Fix a regression in the previous release that broke using :kbd:`ctrl+shift+tab` (:iss:`1671`) +- panel kitten: Fix the contents of the panel kitten not being positioned + correctly on the vertical axis + 0.14.1 [2019-05-29] --------------------- diff --git a/kitty/glfw.c b/kitty/glfw.c index 22797aa2c..1368ae249 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -34,6 +34,8 @@ request_tick_callback(void) { #endif } +static int min_width = 100, min_height = 100; + void update_os_window_viewport(OSWindow *window, bool notify_boss) { int w, h, fw, fh; @@ -51,8 +53,8 @@ update_os_window_viewport(OSWindow *window, bool notify_boss) { bool dpi_changed = (xr != 0.0 && xr != window->viewport_x_ratio) || (yr != 0.0 && yr != window->viewport_y_ratio) || (xdpi != window->logical_dpi_x) || (ydpi != window->logical_dpi_y); window->viewport_size_dirty = true; - window->viewport_width = MAX(window->viewport_width, 100); - window->viewport_height = MAX(window->viewport_height, 100); + window->viewport_width = MAX(window->viewport_width, min_width); + window->viewport_height = MAX(window->viewport_height, min_height); window->window_width = MAX(w, 100); window->window_height = MAX(h, 100); if (notify_boss) { @@ -99,8 +101,6 @@ show_mouse_cursor(GLFWwindow *w) { glfwSetInputMode(w, GLFW_CURSOR, GLFW_CURSOR_NORMAL); } -static int min_width = 100, min_height = 100; - void blank_os_window(OSWindow *w) { color_type color = OPT(background);