diff options
-rw-r--r-- | doc/help-output.txt | 2 | ||||
-rw-r--r-- | doc/test_xr.txt | 2 | ||||
-rw-r--r-- | source/view.c | 8 |
3 files changed, 8 insertions, 4 deletions
diff --git a/doc/help-output.txt b/doc/help-output.txt index 058290ef..4f83580c 100644 --- a/doc/help-output.txt +++ b/doc/help-output.txt @@ -134,6 +134,8 @@ Global options: True (Default) -[no-]show-match Indicate how it match by underlining it. True (Default) + -theme [string] New style theme file + (unset) (Default) -pid [string] Pidfile location /tmp/rofi.pid (File) -kb-primary-paste [string] Paste primary selection diff --git a/doc/test_xr.txt b/doc/test_xr.txt index cbe76a61..13526a02 100644 --- a/doc/test_xr.txt +++ b/doc/test_xr.txt @@ -98,6 +98,8 @@ rofi.window-format: w c t ! rofi.click-to-exit: true ! "Indicate how it match by underlining it." Set from: Default ! rofi.show-match: true +! "New style theme file" Set from: Default +! rofi.theme: ! "Pidfile location" Set from: File rofi.pid: /tmp/rofi.pid ! "Paste primary selection" Set from: File diff --git a/source/view.c b/source/view.c index 705239fa..aacd1bfd 100644 --- a/source/view.c +++ b/source/view.c @@ -657,7 +657,7 @@ void __create_window ( MenuFlags menu_flags ) * * Calculate the width of the window and the width of an element. */ -static void rofi_view_calculate_window_and_element_width ( RofiViewState *state ) +static void rofi_view_calculate_window_width ( RofiViewState *state ) { if ( config.fullscreen ) { state->width = CacheState.mon.w; @@ -1437,8 +1437,6 @@ RofiViewState *rofi_view_create ( Mode *sw, state->main_box = box_create ( "mainbox.box", BOX_VERTICAL ); window_add ( state->main_window, WIDGET ( state->main_box ) ); - // we need this at this point so we can get height. - rofi_view_calculate_window_and_element_width ( state ); state->input_bar = box_create ( "inputbar.box", BOX_HORIZONTAL ); state->input_bar_separator = separator_create ( "inputbar.separator", S_HORIZONTAL, 2 ); @@ -1516,6 +1514,8 @@ RofiViewState *rofi_view_create ( Mode *sw, if ( (CacheState.flags&MENU_NORMAL_WINDOW) == MENU_NORMAL_WINDOW){ config.fixed_num_lines = TRUE; } + + rofi_view_calculate_window_width ( state ); state->height = rofi_view_calculate_height ( state ); // Move the window to the correct x,y position. @@ -1545,7 +1545,6 @@ int rofi_view_error_dialog ( const char *msg, int markup ) state->menu_flags = MENU_ERROR_DIALOG; state->finalize = process_result; - rofi_view_calculate_window_and_element_width ( state ); state->main_window = window_create ( "window" ); state->main_box = box_create ( "mainbox.box", BOX_VERTICAL); window_add ( state->main_window, WIDGET ( state->main_box ) ); @@ -1561,6 +1560,7 @@ int rofi_view_error_dialog ( const char *msg, int markup ) // resize window vertically to suit state->height = line_height + window_get_border_width ( state->main_window)+widget_padding_get_padding_height ( WIDGET(state->main_window) ); + rofi_view_calculate_window_width ( state ); // Calculte window position. rofi_view_calculate_window_position ( state ); |