Commit 2d2aea00 authored by Daiki Ueno's avatar Daiki Ueno
Browse files

Rewrite 15c0a9da using cairo_pattern_set_extend.

parent 0425b4e0
......@@ -419,7 +419,6 @@ on_key_released (EekKeyboard *keyboard,
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
cairo_t *cr;
EekBounds bounds, large_bounds;
EekColor background;
/* renderer may have not been set yet if the widget is a popup */
if (!priv->renderer)
......@@ -436,17 +435,6 @@ on_key_released (EekKeyboard *keyboard,
large_bounds.height);
cairo_clip (cr);
/* blank background, in case that a large key does not fit in the
keyboard */
eek_renderer_get_background_color (priv->renderer,
EEK_ELEMENT(priv->keyboard),
&background);
cairo_set_source_rgba (cr,
background.red,
background.green,
background.blue,
background.alpha);
cairo_paint (cr);
eek_renderer_render_keyboard (priv->renderer, cr);
cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
cairo_destroy (cr);
......
......@@ -647,6 +647,7 @@ eek_renderer_real_render_keyboard (EekRenderer *self,
cairo_t *cr)
{
EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(self);
cairo_pattern_t *source;
g_return_if_fail (priv->keyboard);
g_return_if_fail (priv->allocation_width > 0.0);
......@@ -656,6 +657,8 @@ eek_renderer_real_render_keyboard (EekRenderer *self,
priv->keyboard_surface = create_keyboard_surface (self);
cairo_set_source_surface (cr, priv->keyboard_surface, 0.0, 0.0);
source = cairo_get_source (cr);
cairo_pattern_set_extend (source, CAIRO_EXTEND_PAD);
cairo_paint (cr);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment