mirror of
https://github.com/kolunmi/dwlb.git
synced 2025-09-07 11:54:45 +00:00
draw empty rectangles on inactive occupied tags
This commit is contained in:
parent
043316cdd7
commit
af679ed301
12
dwlb.c
12
dwlb.c
@ -407,12 +407,22 @@ draw_frame(Bar *bar)
|
|||||||
pixman_color_t *fg_color = urgent ? &urgent_fg_color : (active ? &active_fg_color : &inactive_fg_color);
|
pixman_color_t *fg_color = urgent ? &urgent_fg_color : (active ? &active_fg_color : &inactive_fg_color);
|
||||||
pixman_color_t *bg_color = urgent ? &urgent_bg_color : (active ? &active_bg_color : &inactive_bg_color);
|
pixman_color_t *bg_color = urgent ? &urgent_bg_color : (active ? &active_bg_color : &inactive_bg_color);
|
||||||
|
|
||||||
if (!hide_vacant && occupied)
|
if (!hide_vacant && occupied) {
|
||||||
pixman_image_fill_boxes(PIXMAN_OP_SRC, foreground,
|
pixman_image_fill_boxes(PIXMAN_OP_SRC, foreground,
|
||||||
fg_color, 1, &(pixman_box32_t){
|
fg_color, 1, &(pixman_box32_t){
|
||||||
.x1 = x + boxs, .x2 = x + boxs + boxw,
|
.x1 = x + boxs, .x2 = x + boxs + boxw,
|
||||||
.y1 = boxs, .y2 = boxs + boxw
|
.y1 = boxs, .y2 = boxs + boxw
|
||||||
});
|
});
|
||||||
|
if ((!bar->selmon || !active) && boxw >= 3) {
|
||||||
|
/* Make box hollow */
|
||||||
|
pixman_image_fill_boxes(PIXMAN_OP_SRC, foreground,
|
||||||
|
&(pixman_color_t){ 0 },
|
||||||
|
1, &(pixman_box32_t){
|
||||||
|
.x1 = x + boxs + 1, .x2 = x + boxs + boxw - 1,
|
||||||
|
.y1 = boxs + 1, .y2 = boxs + boxw - 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
x = draw_text(tags[i], x, y, foreground, background, fg_color, bg_color,
|
x = draw_text(tags[i], x, y, foreground, background, fg_color, bg_color,
|
||||||
bar->width, bar->height, bar->textpadding, NULL, 0);
|
bar->width, bar->height, bar->textpadding, NULL, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user