1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-12-09 14:09:41 -05:00

Fix desired size of listview, tweak textbox rendering

This commit is contained in:
Dave Davenport 2016-12-28 14:10:27 +01:00
parent d63b9cb15e
commit 91baac3968
2 changed files with 5 additions and 5 deletions

View file

@ -461,7 +461,7 @@ unsigned int listview_get_desired_height ( listview *lv )
if ( h == 0 ) {
return 0;
}
return h * lv->element_height + ( h - 1 ) * lv->spacing;
return h * lv->element_height + ( h - 1 ) * lv->spacing+lv->widget.pad.top+lv->widget.pad.bottom;
}
void listview_set_show_scrollbar ( listview *lv, gboolean enabled )

View file

@ -295,7 +295,7 @@ static void texbox_update ( textbox *tb )
}
tb->main_surface = cairo_image_surface_create ( CAIRO_FORMAT_ARGB32, tb->widget.w, tb->widget.h );
tb->main_draw = cairo_create ( tb->main_surface );
cairo_set_operator ( tb->main_draw, CAIRO_OPERATOR_SOURCE );
cairo_set_operator ( tb->main_draw, CAIRO_OPERATOR_OVER );
pango_cairo_update_layout ( tb->main_draw, tb->layout );
int font_height = textbox_get_font_height ( tb );
@ -336,8 +336,8 @@ static void texbox_update ( textbox *tb )
y = tb->widget.pad.top + ( pango_font_metrics_get_ascent ( p_metrics ) - pango_layout_get_baseline ( tb->layout ) ) / PANGO_SCALE;
// Set background transparency
cairo_set_source_rgba ( tb->main_draw, 0,0,0,0.0);
cairo_paint ( tb->main_draw );
//cairo_set_source_rgba ( tb->main_draw, 0,0,0,0.0);
//cairo_paint ( tb->main_draw );
rofi_theme_get_color ( tb->widget.class_name, tb->widget.name, tb->widget.state, "foreground", tb->main_draw);
// draw the cursor
@ -348,7 +348,7 @@ static void texbox_update ( textbox *tb )
// Set ARGB
// We need to set over, otherwise subpixel hinting wont work.
cairo_set_operator ( tb->main_draw, CAIRO_OPERATOR_OVER );
//cairo_set_operator ( tb->main_draw, CAIRO_OPERATOR_OVER );
cairo_move_to ( tb->main_draw, x, y );
pango_cairo_show_layout ( tb->main_draw, tb->layout );