1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

Don't overlay sb on textboxes.

This commit is contained in:
QC 2015-09-06 10:12:09 +02:00
parent 355ad8fe70
commit 80d148707a

View file

@ -780,6 +780,9 @@ static void menu_draw ( MenuState *state )
scrollbar_draw ( state->scrollbar );
// Element width.
unsigned int element_width = state->w - ( 2 * ( config.padding ) );
if ( state->scrollbar != NULL ) {
element_width -= state->scrollbar->w;
}
if ( columns > 0 ) {
element_width = ( element_width - ( columns - 1 ) * config.line_margin ) / columns;
}
@ -1023,10 +1026,11 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
state.element_width, element_height, NORMAL, "" );
}
if ( !config.hide_scrollbar ) {
unsigned int sbw = config.line_margin + 8;
state.scrollbar = scrollbar_create ( main_window, &vinfo, map,
state.w - config.padding - config.line_margin - 8,
state.w - config.padding - sbw,
state.top_offset,
config.line_margin + 8,
sbw,
( state.max_rows - 1 ) * ( element_height + config.line_margin ) + element_height );
}