mirror of
https://github.com/davatorium/rofi.git
synced 2025-01-27 15:25:24 -05:00
Make error dialog widget layout match normal one
This commit is contained in:
parent
c7e860bb55
commit
ce2cf6b2d9
3 changed files with 19 additions and 3 deletions
|
@ -177,6 +177,14 @@ void listview_set_multi_select ( listview *lv, gboolean enable );
|
|||
*/
|
||||
void listview_set_num_lines ( listview *lv, unsigned int num_lines );
|
||||
|
||||
/**
|
||||
* @param lv Handler to the listview object.
|
||||
*
|
||||
* Get the maximum number of lines to display.
|
||||
*
|
||||
* @returns get the numger of lines to display.
|
||||
*/
|
||||
unsigned int listview_get_num_lines ( listview *lv );
|
||||
/**
|
||||
* @param lv Handler to the listview object.
|
||||
* @param max_lines the maximum number of lines to display.
|
||||
|
|
|
@ -1423,7 +1423,7 @@ void rofi_view_itterrate ( RofiViewState *state, xcb_generic_event_t *ev, xkb_st
|
|||
static int rofi_view_calculate_height ( RofiViewState *state )
|
||||
{
|
||||
unsigned int height = 0;
|
||||
if ( config.menu_lines == 0 || config.fullscreen == TRUE ) {
|
||||
if ( listview_get_num_lines ( state->list_view ) == 0 || config.fullscreen == TRUE ) {
|
||||
height = CacheState.mon.h;
|
||||
return height;
|
||||
}
|
||||
|
@ -1587,9 +1587,9 @@ int rofi_view_error_dialog ( const char *msg, int markup )
|
|||
state->finalize = process_result;
|
||||
|
||||
state->main_window = container_create ( "window" );
|
||||
state->main_box = box_create ( "window.mainbox", BOX_VERTICAL);
|
||||
state->main_box = box_create ( "window.mainbox.message.box", BOX_VERTICAL);
|
||||
container_add ( state->main_window, WIDGET ( state->main_box ) );
|
||||
state->text = textbox_create ( "window.mainbox.message", ( TB_AUTOHEIGHT | TB_WRAP ) + ( ( markup ) ? TB_MARKUP : 0 ),
|
||||
state->text = textbox_create ( "window.mainbox.message.textbox", ( TB_AUTOHEIGHT | TB_WRAP ) + ( ( markup ) ? TB_MARKUP : 0 ),
|
||||
NORMAL, ( msg != NULL ) ? msg : "" );
|
||||
box_add ( state->main_box, WIDGET ( state->text ), TRUE, 1 );
|
||||
|
||||
|
|
|
@ -591,6 +591,14 @@ void listview_set_num_lines ( listview *lv, unsigned int num_lines )
|
|||
lv->menu_lines = num_lines;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int listview_get_num_lines ( listview *lv )
|
||||
{
|
||||
if ( lv ) {
|
||||
return lv->menu_lines;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
void listview_set_max_lines ( listview *lv, unsigned int max_lines )
|
||||
{
|
||||
if ( lv ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue