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

@ -50,10 +50,10 @@ Settings config = {
/** Row colors */
// Enable new color
.color_normal = "#fdf6e3,#002b36,#eee8d5,#586e75,#eee8d5",
.color_urgent = "#fdf6e3,#dc322f,#eee8d5,#dc322f,#fdf6e3",
.color_active = "#fdf6e3,#268bd2,#eee8d5,#268bd2,#fdf6e3",
.color_window = "#fdf6e3,#002b36",
.color_normal = "#fdf6e3,#002b36,#eee8d5,#586e75,#eee8d5",
.color_urgent = "#fdf6e3,#dc322f,#eee8d5,#dc322f,#fdf6e3",
.color_active = "#fdf6e3,#268bd2,#eee8d5,#268bd2,#fdf6e3",
.color_window = "#fdf6e3,#002b36",
/** Terminal to use. (for ssh and open in terminal) */
.terminal_emulator = "rofi-sensible-terminal",

View File

@ -318,14 +318,22 @@ static void rofi_view_resize ( RofiViewState *state )
textbox_draw ( state->modi[j], CacheState.draw );
}
}
int entrybox_width = state->w - ( 2 * ( state->border ) ) - textbox_get_width ( state->prompt_tb )
- textbox_get_width ( state->case_indicator );
int entrybox_width = state->w - ( 2 * ( state->border ) );
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 );
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
*/
{
if ( state->num_lines > 0 ) {
unsigned int last_length = state->max_elements;
int element_height = state->line_height * config.element_height + config.line_margin;
// Calculated new number of boxes.

View File

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