mirror of
https://github.com/tmux/tmux.git
synced 2025-04-10 11:08:49 +00:00
Use fg for slider.
This commit is contained in:
parent
561441fa54
commit
3fed73d86b
@ -1016,19 +1016,21 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
|
|||||||
struct client *c = ctx->c;
|
struct client *c = ctx->c;
|
||||||
struct window *w = wp->window;
|
struct window *w = wp->window;
|
||||||
struct tty *tty = &c->tty;
|
struct tty *tty = &c->tty;
|
||||||
struct grid_cell gc;
|
struct grid_cell gc, slgc, *gcp;
|
||||||
u_int i, j, sb_w = PANE_SCROLLBARS_WIDTH;
|
u_int i, j, sb_w = PANE_SCROLLBARS_WIDTH;
|
||||||
u_int pad_col = 0;
|
u_int pad_col = 0;
|
||||||
int fg, bg, px, py, ox = ctx->ox, oy = ctx->oy;
|
int px, py, ox = ctx->ox, oy = ctx->oy;
|
||||||
int sb_pad = PANE_SCROLLBARS_PADDING, sx = ctx->sx;
|
int sb_pad = PANE_SCROLLBARS_PADDING, sx = ctx->sx;
|
||||||
int sy = ctx->sy, xoff = wp->xoff, yoff = wp->yoff;
|
int sy = ctx->sy, xoff = wp->xoff, yoff = wp->yoff;
|
||||||
|
|
||||||
/* Set up default colour. */
|
/* Set up default style. */
|
||||||
style_apply(&gc, w->options, "pane-scrollbars-style", NULL);
|
style_apply(&gc, w->options, "pane-scrollbars-style", NULL);
|
||||||
fg = gc.fg;
|
|
||||||
bg = gc.bg;
|
|
||||||
utf8_set(&gc.data, ' ');
|
utf8_set(&gc.data, ' ');
|
||||||
|
|
||||||
|
/* Set up style for slider. */
|
||||||
|
memcpy(&slgc, &gc, sizeof slgc);
|
||||||
|
slgc.bg = gc.fg;
|
||||||
|
|
||||||
if (sb_pad != 0) {
|
if (sb_pad != 0) {
|
||||||
if (sb_pos == PANE_SCROLLBARS_RIGHT)
|
if (sb_pos == PANE_SCROLLBARS_RIGHT)
|
||||||
pad_col = 0;
|
pad_col = 0;
|
||||||
@ -1048,15 +1050,11 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
|
|||||||
tty_cell(tty, &grid_default_cell,
|
tty_cell(tty, &grid_default_cell,
|
||||||
&grid_default_cell, NULL, NULL);
|
&grid_default_cell, NULL, NULL);
|
||||||
} else {
|
} else {
|
||||||
if (j >= slider_y &&
|
if (j >= slider_y && j < slider_y + slider_h)
|
||||||
j < slider_y + slider_h) {
|
gcp = &slgc;
|
||||||
gc.bg = fg;
|
else
|
||||||
gc.fg = bg;
|
gcp = &gc;
|
||||||
} else {
|
tty_cell(tty, gcp, &grid_default_cell, NULL,
|
||||||
gc.bg = bg;
|
|
||||||
gc.fg = fg;
|
|
||||||
}
|
|
||||||
tty_cell(tty, &gc, &grid_default_cell, NULL,
|
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
8
tmux.1
8
tmux.1
@ -5050,15 +5050,17 @@ If set to
|
|||||||
the pane is narrowed only when the scrollbar is visible.
|
the pane is narrowed only when the scrollbar is visible.
|
||||||
.Pp
|
.Pp
|
||||||
See also
|
See also
|
||||||
.Xr pane-scrollbar-style .
|
.Xr pane-scrollbars-style .
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic pane-scrollbar-style Ar style
|
.It Ic pane-scrollbars-style Ar style
|
||||||
Set the pane scrollbar style for the currently active pane.
|
Set the scrollbars style.
|
||||||
For how to specify
|
For how to specify
|
||||||
.Ar style ,
|
.Ar style ,
|
||||||
see the
|
see the
|
||||||
.Sx STYLES
|
.Sx STYLES
|
||||||
section.
|
section.
|
||||||
|
The foreground colour is used for the slider, the background for the rest of the
|
||||||
|
scrollbar.
|
||||||
Attributes are ignored.
|
Attributes are ignored.
|
||||||
.Pp
|
.Pp
|
||||||
.It Xo Ic pane-scrollbars-position
|
.It Xo Ic pane-scrollbars-position
|
||||||
|
Loading…
Reference in New Issue
Block a user