mirror of https://github.com/davatorium/rofi.git
Arrow hmode.
This commit is contained in:
parent
eb20e77d6e
commit
224dadaddd
|
@ -1004,20 +1004,20 @@ MenuReturn menu ( char **lines, char **input, char *prompt, Time *time, int *shi
|
||||||
}
|
}
|
||||||
// Arrows
|
// Arrows
|
||||||
textbox *arrowbox_top = NULL, *arrowbox_bottom = NULL;
|
textbox *arrowbox_top = NULL, *arrowbox_bottom = NULL;
|
||||||
if ( config.hmode == FALSE ) {
|
|
||||||
arrowbox_top = textbox_create ( box, TB_AUTOHEIGHT | TB_AUTOWIDTH,
|
arrowbox_top = textbox_create ( box, TB_AUTOHEIGHT | TB_AUTOWIDTH,
|
||||||
( config.padding ),
|
( config.padding ),
|
||||||
( config.padding ),
|
( config.padding ),
|
||||||
0, 0,
|
0, 0,
|
||||||
NORMAL,
|
NORMAL,
|
||||||
"↑" );
|
( config.hmode == FALSE ) ? "↑" : "←" );
|
||||||
arrowbox_bottom = textbox_create ( box, TB_AUTOHEIGHT | TB_AUTOWIDTH,
|
arrowbox_bottom = textbox_create ( box, TB_AUTOHEIGHT | TB_AUTOWIDTH,
|
||||||
( config.padding ),
|
( config.padding ),
|
||||||
( config.padding ),
|
( config.padding ),
|
||||||
0, 0,
|
0, 0,
|
||||||
NORMAL,
|
NORMAL,
|
||||||
"↓" );
|
( config.hmode == FALSE ) ? "↓" : "→" );
|
||||||
|
|
||||||
|
if ( config.hmode == FALSE ) {
|
||||||
textbox_move ( arrowbox_top,
|
textbox_move ( arrowbox_top,
|
||||||
w - config.padding - arrowbox_top->w,
|
w - config.padding - arrowbox_top->w,
|
||||||
config.padding + line_height + LINE_MARGIN );
|
config.padding + line_height + LINE_MARGIN );
|
||||||
|
@ -1025,6 +1025,14 @@ MenuReturn menu ( char **lines, char **input, char *prompt, Time *time, int *shi
|
||||||
w - config.padding - arrowbox_bottom->w,
|
w - config.padding - arrowbox_bottom->w,
|
||||||
config.padding + max_rows * line_height + LINE_MARGIN );
|
config.padding + max_rows * line_height + LINE_MARGIN );
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
textbox_move ( arrowbox_bottom,
|
||||||
|
w - config.padding - arrowbox_top->w,
|
||||||
|
config.padding );
|
||||||
|
textbox_move ( arrowbox_top,
|
||||||
|
w - config.padding - arrowbox_bottom->w - arrowbox_top->w,
|
||||||
|
config.padding );
|
||||||
|
}
|
||||||
|
|
||||||
// filtered list
|
// filtered list
|
||||||
char **filtered = calloc ( num_lines, sizeof ( char* ) );
|
char **filtered = calloc ( num_lines, sizeof ( char* ) );
|
||||||
|
|
Loading…
Reference in New Issue