mirror of
https://github.com/davatorium/rofi.git
synced 2025-02-03 15:34:54 -05:00
Reverse scrollbar when listview is reversed.
This commit is contained in:
parent
a836346968
commit
3f8c5378c4
1 changed files with 5 additions and 1 deletions
|
@ -163,7 +163,11 @@ static void listview_draw ( widget *wid, cairo_t *draw )
|
|||
// Set these all together to make sure they update consistently.
|
||||
scrollbar_set_max_value ( lv->scrollbar, lv->req_elements );
|
||||
scrollbar_set_handle_length ( lv->scrollbar, lv->cur_columns * lv->max_rows );
|
||||
scrollbar_set_handle ( lv->scrollbar, lv->selected );
|
||||
if ( lv->reverse ) {
|
||||
scrollbar_set_handle ( lv->scrollbar, lv->req_elements - lv->selected -1 );
|
||||
} else {
|
||||
scrollbar_set_handle ( lv->scrollbar, lv->selected );
|
||||
}
|
||||
lv->last_offset = offset;
|
||||
int spacing_vert = distance_get_pixel ( lv->spacing, ORIENTATION_VERTICAL );
|
||||
int spacing_hori = distance_get_pixel ( lv->spacing, ORIENTATION_HORIZONTAL );
|
||||
|
|
Loading…
Add table
Reference in a new issue