Draw a separator line after each tab (doesn’t use extra space) (by Aaron Small)

This commit is contained in:
Michael Stapelberg 2012-01-21 11:07:10 +00:00
parent 1784b3858d
commit fa83b46dfa
1 changed files with 8 additions and 1 deletions

View File

@ -447,7 +447,14 @@ void x_draw_decoration(Con *con) {
* on the border pixels on the right side of a window. Therefore, we draw * on the border pixels on the right side of a window. Therefore, we draw
* the right border again after rendering the text (and the unconnected * the right border again after rendering the text (and the unconnected
* lines in border color). */ * lines in border color). */
xcb_change_gc(conn, parent->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]){ p->color->background });
/* Draw a separator line after every tab (except the last one), so that
* tabs can be easily distinguished. */
if (parent->layout == L_TABBED && TAILQ_NEXT(con, nodes) != NULL) {
xcb_change_gc(conn, parent->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]){ p->color->border });
} else {
xcb_change_gc(conn, parent->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]){ p->color->background });
}
xcb_poly_line(conn, XCB_COORD_MODE_ORIGIN, parent->pixmap, parent->pm_gc, 4, xcb_poly_line(conn, XCB_COORD_MODE_ORIGIN, parent->pixmap, parent->pm_gc, 4,
(xcb_point_t[]){ (xcb_point_t[]){
{ dr->x + dr->width - 1, dr->y }, { dr->x + dr->width - 1, dr->y },