Border color of on-screen-display
*osd.border.width*
- Border width of on-screen-display
+ Border width of on-screen-display. Inherits *border.width* if not set.
*osd.label.text.color*
Text color of on-screen-display
*osd.window-switcher.width*
Width of window switcher in pixels. Default is 600.
+*osd.window-switcher.padding*
+ Padding of window switcher in pixels. This is the space between the
+ window-switcher border and its items. Inherits *osd.border.width* if
+ not set.
+
*osd.window-switcher.item.padding.x*
Horizontal padding of window switcher entries in pixels.
Default is 10.
osd.label.text.color: #000000
osd.window-switcher.width: 600
+osd.window-switcher.padding: 1
osd.window-switcher.item.padding.x: 10
osd.window-switcher.item.padding.y: 6
float osd_label_text_color[4];
int osd_window_switcher_width;
+ int osd_window_switcher_padding;
int osd_window_switcher_item_padding_x;
int osd_window_switcher_item_padding_y;
/* Add OSD border width */
height += 2 * rc.theme->osd_border_width;
+ height += 2 * rc.theme->osd_window_switcher_padding;
return height;
}
pango_cairo_update_layout(cairo, layout);
- int y = theme->osd_border_width;
+ int y = theme->osd_border_width + theme->osd_window_switcher_padding;
/* Draw workspace indicator */
if (show_workspace) {
* Subtract 4x border-width to allow for both the OSD border and the
* item border. This is the width of the area available for text fields.
*/
- int available_width = w - 4 * theme->osd_border_width;
+ int available_width = w - 4 * theme->osd_border_width
+ - 2 * theme->osd_window_switcher_padding;
/* Draw text for each node */
wl_list_for_each_reverse(node, node_list, link) {
*/
y += theme->osd_border_width;
int x = theme->osd_window_switcher_item_padding_x
- + 2 * theme->osd_border_width;
+ + 2 * theme->osd_border_width
+ + theme->osd_window_switcher_padding;
int nr_fields = wl_list_length(&rc.window_switcher.fields);
struct window_switcher_field *field;
if (view == cycle_view) {
/* Highlight current window */
struct wlr_fbox fbox = {
- .x = theme->osd_border_width,
+ .x = theme->osd_border_width + theme->osd_window_switcher_padding,
.y = y - theme->osd_border_width,
.width = theme->osd_window_switcher_width
- - 2 * theme->osd_border_width,
+ - 2 * theme->osd_border_width
+ - 2 * theme->osd_window_switcher_padding,
.height = theme->osd_window_switcher_item_height
+ 2 * theme->osd_border_width,
};
parse_hexstr("#888888", theme->menu_separator_color);
theme->osd_window_switcher_width = 600;
+ theme->osd_window_switcher_padding = INT_MIN;
theme->osd_window_switcher_item_padding_x = 10;
theme->osd_window_switcher_item_padding_y = 6;
if (match_glob(key, "osd.window-switcher.width")) {
theme->osd_window_switcher_width = atoi(value);
}
+ if (match_glob(key, "osd.window-switcher.padding")) {
+ theme->osd_window_switcher_padding = atoi(value);
+ }
if (match_glob(key, "osd.window-switcher.item.padding.x")) {
theme->osd_window_switcher_item_padding_x = atoi(value);
}
if (theme->osd_border_width == INT_MIN) {
theme->osd_border_width = theme->border_width;
}
+ if (theme->osd_window_switcher_padding == INT_MIN) {
+ theme->osd_window_switcher_padding = theme->osd_border_width;
+ }
if (theme->osd_label_text_color[0] == FLT_MIN) {
memcpy(theme->osd_label_text_color,
theme->window_active_label_text_color,