]> git.mdlowis.com Git - proto/labwc.git/commitdiff
osd: consider item.padding.y when centoring workspace name
authortokyo4j <hrak1529@gmail.com>
Tue, 1 Apr 2025 05:06:45 +0000 (14:06 +0900)
committerJohan Malm <johanmalm@users.noreply.github.com>
Tue, 1 Apr 2025 20:14:20 +0000 (21:14 +0100)
src/osd.c

index ef8ec2cb3587e490eeb0cd3eb182f9e0083ca2c5..df15595460b2016c1227d3f668796a273f4cca0c 100644 (file)
--- a/src/osd.c
+++ b/src/osd.c
@@ -302,7 +302,8 @@ create_osd_scene(struct output *output, struct wl_array *views)
                struct scaled_font_buffer *font_buffer =
                        scaled_font_buffer_create(output->osd_scene.tree);
                wlr_scene_node_set_position(&font_buffer->scene_buffer->node,
-                       x, y + theme->osd_window_switcher_item_active_border_width);
+                       x, y + (theme->osd_window_switcher_item_height
+                               - font_height(&font)) / 2);
                scaled_font_buffer_update(font_buffer, workspace_name, 0,
                        &font, text_color, bg_color);
                y += theme->osd_window_switcher_item_height;