]> git.mdlowis.com Git - proto/labwc.git/commitdiff
osd: add osd.workspace-switcher.boxes.border.width
authorDmitry <deekovalev@gmail.com>
Sun, 6 Apr 2025 11:05:04 +0000 (15:05 +0400)
committerJohan Malm <johanmalm@users.noreply.github.com>
Mon, 14 Apr 2025 19:06:38 +0000 (20:06 +0100)
docs/labwc-theme.5.scd
docs/themerc
include/theme.h
src/theme.c
src/workspaces.c

index fff52721f8247030440c3625ddf803dbb51f301f..5b267f35c71b9dc978b4529f5a1f6441ab25597b 100644 (file)
@@ -281,6 +281,9 @@ all are supported.
        Height of boxes in workspace switcher in pixels. Setting to 0 disables
        boxes. Default is 20.
 
+*osd.workspace-switcher.boxes.border.width*
+       Border width of boxes in workspace switcher in pixels. Default is 2.
+
 *snapping.overlay.region.bg.enabled* [yes|no]
        Show a filled rectangle as an overlay when a window is snapped to a
        region. Default is yes for hardware-based renderers and no for
index 6417d5bdc21e35b0e8e909e2409f74222971d38e..7ac293f706d5b46ade6f8c4bd91d60647cad5293 100644 (file)
@@ -96,6 +96,7 @@ osd.window-switcher.preview.border.color: #dddda6,#000000,#dddda6
 
 osd.workspace-switcher.boxes.width: 20
 osd.workspace-switcher.boxes.height: 20
+osd.workspace-switcher.boxes.border.width: 2
 
 # Default values for following options change depending on the rendering
 # backend. For software-based renderers, *.bg.enabled is "no" and
index cbdee13570e960b21f61fdf9aafcc1997afc0032..283538d484137765c73cfd5b5b6b82e6d450d87e 100644 (file)
@@ -142,6 +142,7 @@ struct theme {
 
        int osd_workspace_switcher_boxes_width;
        int osd_workspace_switcher_boxes_height;
+       int osd_workspace_switcher_boxes_border_width;
 
        struct theme_snapping_overlay
                snapping_overlay_region, snapping_overlay_edge;
index c987ad2d61861821961312184fdf662b908b3e3e..34b4d4a1a101c5f7996e17c067a9031fb400f27a 100644 (file)
@@ -551,6 +551,7 @@ theme_builtin(struct theme *theme, struct server *server)
 
        theme->osd_workspace_switcher_boxes_width = 20;
        theme->osd_workspace_switcher_boxes_height = 20;
+       theme->osd_workspace_switcher_boxes_border_width = 2;
 
        /* inherit settings in post_processing() if not set elsewhere */
        theme->osd_bg_color[0] = FLT_MIN;
@@ -903,6 +904,11 @@ entry(struct theme *theme, const char *key, const char *value)
                        get_int_if_positive(
                                value, "osd.workspace-switcher.boxes.height");
        }
+       if (match_glob(key, "osd.workspace-switcher.boxes.border.width")) {
+               theme->osd_workspace_switcher_boxes_border_width =
+                       get_int_if_positive(
+                               value, "osd.workspace-switcher.boxes.border.width");
+       }
        if (match_glob(key, "osd.label.text.color")) {
                parse_hexstr(value, theme->osd_label_text_color);
        }
index ec7106e1f9e25fa35f62127f31196cbec36b5203..14ed51a91ee3d43cd61bf8fe738594e309130afc 100644 (file)
@@ -120,7 +120,8 @@ _osd_update(struct server *server)
                                        .width = rect_width,
                                        .height = rect_height,
                                };
-                               draw_cairo_border(cairo, fbox, 2);
+                               draw_cairo_border(cairo, fbox,
+                                       theme->osd_workspace_switcher_boxes_border_width);
                                if (active) {
                                        cairo_rectangle(cairo, x, margin,
                                                rect_width, rect_height);