mirror of
https://github.com/davatorium/rofi.git
synced 2025-02-10 15:44:41 -05:00
Listview: hide widget when no row is visible and dynamic is enabled.
This commit is contained in:
parent
0e037237f8
commit
52f4f32d89
2 changed files with 4 additions and 7 deletions
|
@ -1381,13 +1381,6 @@ static int rofi_view_calculate_height ( RofiViewState *state )
|
|||
height = CacheState.mon.h;
|
||||
return height;
|
||||
}
|
||||
if ( state->filtered_lines == 0 && !config.fixed_num_lines ) {
|
||||
widget_disable ( WIDGET ( state->list_view) );
|
||||
}
|
||||
else {
|
||||
widget_enable ( WIDGET ( state->list_view) );
|
||||
}
|
||||
|
||||
|
||||
widget *main_window = WIDGET ( state->main_window );
|
||||
height = widget_get_desired_height ( main_window );
|
||||
|
|
|
@ -523,6 +523,10 @@ static int listview_get_desired_height ( widget *wid )
|
|||
}
|
||||
}
|
||||
if ( h == 0 ) {
|
||||
if ( lv->dynamic && !lv->fixed_num_lines ){
|
||||
// Hide widget fully.
|
||||
return 0;
|
||||
}
|
||||
return widget_padding_get_padding_height ( WIDGET (lv) );
|
||||
}
|
||||
int height = widget_padding_get_padding_height ( WIDGET (lv) );
|
||||
|
|
Loading…
Add table
Reference in a new issue