mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-03 04:23:42 -05:00
Arrow hmode.
This commit is contained in:
parent
eb20e77d6e
commit
224dadaddd
1 changed files with 11 additions and 3 deletions
|
@ -1004,20 +1004,20 @@ MenuReturn menu ( char **lines, char **input, char *prompt, Time *time, int *shi
|
|||
}
|
||||
// Arrows
|
||||
textbox *arrowbox_top = NULL, *arrowbox_bottom = NULL;
|
||||
if ( config.hmode == FALSE ) {
|
||||
arrowbox_top = textbox_create ( box, TB_AUTOHEIGHT | TB_AUTOWIDTH,
|
||||
( config.padding ),
|
||||
( config.padding ),
|
||||
0, 0,
|
||||
NORMAL,
|
||||
"↑" );
|
||||
( config.hmode == FALSE ) ? "↑" : "←" );
|
||||
arrowbox_bottom = textbox_create ( box, TB_AUTOHEIGHT | TB_AUTOWIDTH,
|
||||
( config.padding ),
|
||||
( config.padding ),
|
||||
0, 0,
|
||||
NORMAL,
|
||||
"↓" );
|
||||
( config.hmode == FALSE ) ? "↓" : "→" );
|
||||
|
||||
if ( config.hmode == FALSE ) {
|
||||
textbox_move ( arrowbox_top,
|
||||
w - config.padding - arrowbox_top->w,
|
||||
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,
|
||||
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
|
||||
char **filtered = calloc ( num_lines, sizeof ( char* ) );
|
||||
|
|
Loading…
Reference in a new issue