mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Move indicator to end of entry box.
This commit is contained in:
parent
08485c0cfc
commit
e166fa3d8e
2 changed files with 18 additions and 14 deletions
|
@ -124,7 +124,8 @@ char *token_collate_key ( const char *token, int case_sensitive )
|
||||||
|
|
||||||
if ( case_sensitive ) {
|
if ( case_sensitive ) {
|
||||||
tmp = g_strdup ( token );
|
tmp = g_strdup ( token );
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
tmp = g_utf8_casefold ( token, -1 );
|
tmp = g_utf8_casefold ( token, -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1419,21 +1419,23 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
|
||||||
NORMAL, "*" );
|
NORMAL, "*" );
|
||||||
|
|
||||||
state.prompt_tb = textbox_create ( main_window, TB_AUTOHEIGHT | TB_AUTOWIDTH,
|
state.prompt_tb = textbox_create ( main_window, TB_AUTOHEIGHT | TB_AUTOWIDTH,
|
||||||
( config.padding ) + textbox_get_width ( state.case_indicator ),
|
( config.padding ),
|
||||||
( config.padding ),
|
( config.padding ),
|
||||||
0, 0, NORMAL, prompt );
|
0, 0, NORMAL, prompt );
|
||||||
|
|
||||||
state.text = textbox_create ( main_window, TB_AUTOHEIGHT | TB_EDITABLE,
|
state.text = textbox_create ( main_window, TB_AUTOHEIGHT | TB_EDITABLE,
|
||||||
( config.padding ) + textbox_get_width ( state.prompt_tb )
|
( config.padding ) + textbox_get_width ( state.prompt_tb ),
|
||||||
+ textbox_get_width ( state.case_indicator ),
|
|
||||||
( config.padding ),
|
( config.padding ),
|
||||||
( ( config.hmode == TRUE ) ?
|
( ( config.hmode == TRUE ) ?
|
||||||
state.element_width : ( state.w - ( 2 * ( config.padding ) ) ) )
|
state.element_width : ( state.w - ( 2 * ( config.padding ) ) ) )
|
||||||
- textbox_get_width ( state.prompt_tb )
|
- textbox_get_width ( state.prompt_tb )
|
||||||
- textbox_get_width ( state.case_indicator ), 1,
|
- textbox_get_width ( state.case_indicator ), 0,
|
||||||
NORMAL,
|
NORMAL,
|
||||||
( input != NULL ) ? *input : "" );
|
( input != NULL ) ? *input : "" );
|
||||||
|
// Move indicator to end.
|
||||||
|
textbox_move ( state.case_indicator,
|
||||||
|
state.w - ( 2 * ( config.padding ) ) - textbox_get_width ( state.case_indicator ),
|
||||||
|
0 );
|
||||||
|
|
||||||
textbox_show ( state.text );
|
textbox_show ( state.text );
|
||||||
textbox_show ( state.prompt_tb );
|
textbox_show ( state.prompt_tb );
|
||||||
|
@ -1641,7 +1643,8 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
|
||||||
state.update = TRUE;
|
state.update = TRUE;
|
||||||
if ( config.case_sensitive ) {
|
if ( config.case_sensitive ) {
|
||||||
textbox_show ( state.case_indicator );
|
textbox_show ( state.case_indicator );
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
textbox_hide ( state.case_indicator );
|
textbox_hide ( state.case_indicator );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue