Commit 0809db9e authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz

Remove some rendering code with no effect and warnings

parent 15a33158
......@@ -94,7 +94,6 @@ static void render_released_key (GtkWidget *widget,
static void
eek_gtk_keyboard_real_realize (GtkWidget *self)
{
gtk_widget_set_double_buffered (self, FALSE);
gtk_widget_set_events (self,
GDK_EXPOSURE_MASK |
GDK_KEY_PRESS_MASK |
......@@ -118,8 +117,6 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
gtk_widget_get_allocation (self, &allocation);
if (!priv->renderer) {
GtkStyle *style;
GtkStateType state;
PangoContext *pcontext;
EekColor *color;
......@@ -131,30 +128,8 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
eek_renderer_set_allocation_size (priv->renderer,
allocation.width,
allocation.height);
style = gtk_widget_get_style (self);
state = gtk_widget_get_state (self);
color = color_from_gdk_color (&style->text[state]);
eek_renderer_set_default_foreground_color (priv->renderer, color);
eek_color_free (color);
color = color_from_gdk_color (&style->base[state]);
eek_renderer_set_default_background_color (priv->renderer, color);
eek_color_free (color);
}
/* blank background */
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);
/* redraw pressed key */
......
......@@ -166,8 +166,8 @@ create_keyboard_surface (EekRenderer *renderer)
eek_element_get_bounds (EEK_ELEMENT(priv->keyboard), &bounds);
keyboard_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
bounds.width * priv->scale,
bounds.height * priv->scale);
ceil(bounds.width * priv->scale),
ceil(bounds.height * priv->scale));
data.cr = cairo_create (keyboard_surface);
data.renderer = renderer;
......
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