mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Reset line style, reset state after drawing border.
This commit is contained in:
parent
9dd3cb312e
commit
5d70985bb9
2 changed files with 4 additions and 0 deletions
|
@ -397,6 +397,8 @@ void distance_get_linestyle ( Distance d, cairo_t *draw )
|
|||
if ( d.style == DASH ){
|
||||
const double dashes[1] = { 4 };
|
||||
cairo_set_dash ( draw, dashes, 1, 0.0 );
|
||||
} else {
|
||||
cairo_set_dash ( draw, NULL, 0, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -118,6 +118,7 @@ void widget_draw ( widget *widget, cairo_t *d )
|
|||
int right = distance_get_pixel ( widget->border.right, ORIENTATION_VERTICAL );
|
||||
int bottom = distance_get_pixel ( widget->border.bottom, ORIENTATION_VERTICAL );
|
||||
if ( left || top || right || bottom ) {
|
||||
cairo_save ( d );
|
||||
rofi_theme_get_color ( widget, "foreground", d );
|
||||
if ( left > 0 ) {
|
||||
cairo_set_line_width ( d, left );
|
||||
|
@ -147,6 +148,7 @@ void widget_draw ( widget *widget, cairo_t *d )
|
|||
cairo_line_to ( d, widget->w-margin_right, widget->h-bottom/2.0-margin_bottom);
|
||||
cairo_stroke ( d );
|
||||
}
|
||||
cairo_restore (d);
|
||||
}
|
||||
widget->draw ( widget, d );
|
||||
widget->need_redraw = FALSE;
|
||||
|
|
Loading…
Reference in a new issue