1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-03 04:23:42 -05:00

Try to fix things

This commit is contained in:
Dave Davenport 2016-03-05 23:25:46 +01:00
parent f4f2e3d129
commit b13bff6d1d
3 changed files with 17 additions and 9 deletions

View file

@ -318,14 +318,22 @@ static void rofi_view_resize ( RofiViewState *state )
textbox_draw ( state->modi[j], CacheState.draw ); textbox_draw ( state->modi[j], CacheState.draw );
} }
} }
int entrybox_width = state->w - ( 2 * ( state->border ) ) - textbox_get_width ( state->prompt_tb ) int entrybox_width = state->w - ( 2 * ( state->border ) );
- textbox_get_width ( state->case_indicator ); int offset = 0;
if ( state->prompt_tb ) {
entrybox_width -= textbox_get_width ( state->prompt_tb );
}
if ( state->case_indicator ) {
int width = textbox_get_width ( state->case_indicator );
entrybox_width -= width;
offset = width;
}
textbox_moveresize ( state->text, state->text->widget.x, state->text->widget.y, entrybox_width, state->line_height ); textbox_moveresize ( state->text, state->text->widget.x, state->text->widget.y, entrybox_width, state->line_height );
widget_move ( WIDGET ( state->case_indicator ), state->w - state->border - textbox_get_width ( state->case_indicator ), state->border ); widget_move ( WIDGET ( state->case_indicator ), state->w - state->border - offset, state->border );
/** /**
* Resize in Height * Resize in Height
*/ */
{ if ( state->num_lines > 0 ) {
unsigned int last_length = state->max_elements; unsigned int last_length = state->max_elements;
int element_height = state->line_height * config.element_height + config.line_margin; int element_height = state->line_height * config.element_height + config.line_margin;
// Calculated new number of boxes. // Calculated new number of boxes.

View file

@ -240,7 +240,7 @@ void monitor_active ( workarea *mon )
} }
fprintf ( stderr, "Failed to find selected monitor.\n" ); fprintf ( stderr, "Failed to find selected monitor.\n" );
} }
if ( config.monitor == -3) { if ( config.monitor == -3 ) {
if ( pointer_get ( root, &x, &y ) ) { if ( pointer_get ( root, &x, &y ) ) {
mon->x = x; mon->x = x;
mon->y = y; mon->y = y;