mirror of
https://github.com/davatorium/rofi.git
synced 2025-02-03 15:34:54 -05:00
When order is reversed. reverse listview order fix #523
This commit is contained in:
parent
3f8c5378c4
commit
953e260511
3 changed files with 15 additions and 1 deletions
|
@ -183,6 +183,14 @@ void listview_set_num_lines ( listview *lv, unsigned int num_lines );
|
|||
* Set the maximum number of lines to display.
|
||||
*/
|
||||
void listview_set_max_lines ( listview *lv, unsigned int max_lines );
|
||||
|
||||
/**
|
||||
* @param lv Handler to the listview object.
|
||||
* @param reverse Reverse the listview order.
|
||||
*
|
||||
* Set reversing the listview.
|
||||
*/
|
||||
void listview_reverse ( listview *lv, gboolean reverse );
|
||||
/* @} */
|
||||
|
||||
#endif // ROFI_LISTVIEW_H
|
||||
|
|
|
@ -1505,6 +1505,9 @@ RofiViewState *rofi_view_create ( Mode *sw,
|
|||
widget_disable ( WIDGET ( state->overlay ) );
|
||||
|
||||
state->list_view = listview_create ( "listview", update_callback, state, config.element_height );
|
||||
if ( end ){
|
||||
listview_reverse ( state->list_view, TRUE );
|
||||
}
|
||||
// Set configuration
|
||||
listview_set_multi_select ( state->list_view, ( state->menu_flags & MENU_INDICATOR ) == MENU_INDICATOR );
|
||||
listview_set_scroll_type ( state->list_view, config.scroll_method );
|
||||
|
|
|
@ -370,7 +370,6 @@ listview *listview_create ( const char *name, listview_update_callback cb, void
|
|||
lv->menu_columns = rofi_theme_get_integer (lv->widget.class_name, lv->widget.name, NULL, "columns", config.menu_columns );
|
||||
lv->fixed_num_lines = rofi_theme_get_boolean (lv->widget.class_name, lv->widget.name, NULL, "fixed-height", config.fixed_num_lines );
|
||||
lv->dynamic = rofi_theme_get_boolean (lv->widget.class_name, lv->widget.name, NULL, "dynamic", TRUE );
|
||||
lv->reverse = rofi_theme_get_boolean (lv->widget.class_name, lv->widget.name, NULL, "reverse", FALSE );
|
||||
|
||||
listview_set_show_scrollbar ( lv, rofi_theme_get_boolean ( lv->widget.class_name, lv->widget.name, NULL, "scrollbar", !config.hide_scrollbar ));
|
||||
listview_set_scrollbar_width ( lv, rofi_theme_get_integer ( lv->widget.class_name, lv->widget.name, NULL, "scrollbar-width", config.scrollbar_width ));
|
||||
|
@ -581,3 +580,7 @@ void listview_set_max_lines ( listview *lv, unsigned int max_lines )
|
|||
lv->max_displayed_lines = max_lines;
|
||||
}
|
||||
}
|
||||
void listview_reverse ( listview *lv, gboolean reverse )
|
||||
{
|
||||
lv->reverse = reverse;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue