1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

[FullHeight] Fix height calculation

* Take window border into account.
This commit is contained in:
Dave Davenport 2014-11-10 09:29:20 +01:00
parent 950a177f97
commit 9eb59fb616

View file

@ -1555,16 +1555,14 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
monitor_active ( &mon );
if ( config.menu_lines == 0 ) {
// Autosize it.
int h = mon.h - config.padding * 2 - LINE_MARGIN;
int h = mon.h - config.padding * 2 - LINE_MARGIN - config.menu_bw * 2;
int r = ( h ) / ( line_height * config.element_height ) - 1 - config.sidebar_mode;
// HACK todo fix this.
state.menu_lines = r;
menu_calculate_rows_columns ( &state );
}
else {
state.menu_lines = config.menu_lines;
menu_calculate_rows_columns ( &state );
}
menu_calculate_rows_columns ( &state );