diff options
author | Dave Davenport <qball@gmpclient.org> | 2020-04-26 11:43:14 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2020-04-26 11:43:14 +0200 |
commit | 9a3d4b1d2ecbc0746c49ca7d822a17e8a5c44f44 (patch) | |
tree | 122c28710cd8c426d87cecc5463d54712f6b6b28 /source | |
parent | 09704eb49c6cc9cbd694377d00474bb67b5da059 (diff) |
[Test] Fix compiler warning, theme test (bug in lexer) and more.
Diffstat (limited to 'source')
-rw-r--r-- | source/widgets/listview.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/source/widgets/listview.c b/source/widgets/listview.c index e77438c0..81f34678 100644 --- a/source/widgets/listview.c +++ b/source/widgets/listview.c @@ -45,13 +45,10 @@ /** * Orientation of the listview */ -typedef enum -{ /** Vertical (classical) list */ - LISTVIEW = ROFI_ORIENTATION_VERTICAL, +#define LISTVIEW ROFI_ORIENTATION_VERTICAL /** Horizontal list. (barview) */ - BARVIEW = ROFI_ORIENTATION_HORIZONTAL, -} ViewType; +#define BARVIEW ROFI_ORIENTATION_HORIZONTAL /** * The moving direction of the selection, this (in barview) affects the scrolling. @@ -74,7 +71,7 @@ struct _listview { widget widget; - ViewType type; + RofiOrientation type; // RChanged // Text needs to be repainted. @@ -555,16 +552,10 @@ static void listview_resize ( widget *wid, short w, short h ) lv->max_rows = ( spacing_vert + height ) / ( lv->element_height + spacing_vert ); lv->max_elements = lv->max_rows * lv->menu_columns; - if ( /*lv->scrollbar->widget.index ==*/ 0 ) { - widget_move ( WIDGET ( lv->scrollbar ), - widget_padding_get_left ( WIDGET ( lv ) ), - widget_padding_get_top ( WIDGET ( lv ) ) ); - } - else { - widget_move ( WIDGET ( lv->scrollbar ), - lv->widget.w - widget_padding_get_right ( WIDGET ( lv ) ) - widget_get_width ( WIDGET ( lv->scrollbar ) ), - widget_padding_get_top ( WIDGET ( lv ) ) ); - } + widget_move ( WIDGET ( lv->scrollbar ), + lv->widget.w - widget_padding_get_right ( WIDGET ( lv ) ) - widget_get_width ( WIDGET ( lv->scrollbar ) ), + widget_padding_get_top ( WIDGET ( lv ) ) ); + widget_resize ( WIDGET ( lv->scrollbar ), widget_get_width ( WIDGET ( lv->scrollbar ) ), height ); if ( lv->type == BARVIEW ) { |