summaryrefslogtreecommitdiffstats
path: root/source/view.c
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-12-30 18:31:30 +0100
committerDave Davenport <qball@gmpclient.org>2016-12-30 18:31:30 +0100
commiteafd4697a28b54422a86a2fba686456b78e9486b (patch)
tree1d7948a63522666d29d64c49f17fda129144dd38 /source/view.c
parent04ad719c01c9c339587fece685294c4492737ca8 (diff)
Fix some of the sizing issues.
Diffstat (limited to 'source/view.c')
-rw-r--r--source/view.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/source/view.c b/source/view.c
index ced5a388..a120ce2c 100644
--- a/source/view.c
+++ b/source/view.c
@@ -1361,26 +1361,10 @@ static int rofi_view_calculate_height ( RofiViewState *state )
widget_enable ( WIDGET ( state->input_bar_separator ) );
widget_enable ( WIDGET ( state->list_view) );
}
- height = listview_get_desired_height ( state->list_view );
- // Why not a factor 2 here?
- height += window_get_border_width ( state->main_window );
- height += box_get_fixed_pixels ( state->main_box );
- // How to merge this....
- int perc =0;
+
+
widget *main_window = WIDGET ( state->main_window );
- if ( main_window->pad.top >= 0 ){
- height += main_window->pad.top;
- } else {
- perc -= main_window->pad.top;
- }
- if ( main_window->pad.bottom >= 0 ){
- height += main_window->pad.bottom;
- } else {
- perc -= main_window->pad.bottom;
- }
- if ( perc > 0){
- height = (100*height)/(100-perc);
- }
+ height = widget_get_desired_height ( main_window );
return height;
}