mirror of
https://github.com/lbonn/rofi
synced 2024-11-24 04:43:03 +00:00
First calc size then draw handle.
This commit is contained in:
parent
1e4721b275
commit
67091fa1a7
1 changed files with 1 additions and 1 deletions
|
@ -766,7 +766,6 @@ static void menu_draw ( MenuState *state )
|
||||||
// Set the position.
|
// Set the position.
|
||||||
scrollbar_set_handle ( state->scrollbar, page * state->max_elements );
|
scrollbar_set_handle ( state->scrollbar, page * state->max_elements );
|
||||||
}
|
}
|
||||||
scrollbar_draw ( state->scrollbar );
|
|
||||||
// Re calculate the boxes and sizes, see if we can move this in the menu_calc*rowscolumns
|
// Re calculate the boxes and sizes, see if we can move this in the menu_calc*rowscolumns
|
||||||
// Get number of remaining lines to display.
|
// Get number of remaining lines to display.
|
||||||
unsigned int a_lines = MIN ( ( state->filtered_lines - offset ), state->max_elements );
|
unsigned int a_lines = MIN ( ( state->filtered_lines - offset ), state->max_elements );
|
||||||
|
@ -778,6 +777,7 @@ static void menu_draw ( MenuState *state )
|
||||||
|
|
||||||
// Update the handle length.
|
// Update the handle length.
|
||||||
scrollbar_set_handle_length ( state->scrollbar, columns * state->max_rows );
|
scrollbar_set_handle_length ( state->scrollbar, columns * state->max_rows );
|
||||||
|
scrollbar_draw ( state->scrollbar );
|
||||||
// Element width.
|
// Element width.
|
||||||
unsigned int element_width = state->w - ( 2 * ( config.padding ) );
|
unsigned int element_width = state->w - ( 2 * ( config.padding ) );
|
||||||
if ( columns > 0 ) {
|
if ( columns > 0 ) {
|
||||||
|
|
Loading…
Reference in a new issue