app: use GdkRGBA instead of GdkColor in some places

This commit is contained in:
Michael Natterer 2011-02-23 08:04:07 +01:00
parent 4b92434bb9
commit 4b322b8326
2 changed files with 9 additions and 9 deletions

View File

@ -277,13 +277,12 @@ gimp_canvas_set_bg_color (GimpCanvas *canvas,
GimpRGB *color)
{
GtkWidget *widget = GTK_WIDGET (canvas);
GdkColor gdk_color;
if (! gtk_widget_get_realized (widget))
return;
gimp_rgb_get_gdk_color (color, &gdk_color);
gdk_window_set_background (gtk_widget_get_window (widget), &gdk_color);
gdk_window_set_background_rgba (gtk_widget_get_window (widget),
(GdkRGBA *) color);
gtk_widget_queue_draw (GTK_WIDGET (canvas));
}

View File

@ -47,7 +47,7 @@ typedef struct
gint width;
gint height;
GtkWidget *progress;
GdkColor color;
GdkRGBA color;
PangoLayout *upper;
gint upper_x;
gint upper_y;
@ -73,14 +73,14 @@ static void splash_position_layouts (GimpSplash *splash,
GdkRectangle *area);
static gboolean splash_area_draw (GtkWidget *widget,
cairo_t *cr,
GimpSplash *splash);
GimpSplash *splash);
static void splash_rectangle_union (GdkRectangle *dest,
PangoRectangle *pango_rect,
gint offset_x,
gint offset_y);
static void splash_average_text_area (GimpSplash *splash,
GdkPixbuf *pixbuf,
GdkColor *color);
GdkRGBA *rgba);
static GdkPixbufAnimation *
splash_image_load (gint max_width,
@ -293,7 +293,7 @@ splash_area_draw (GtkWidget *widget,
cairo_t *cr,
GimpSplash *splash)
{
gdk_cairo_set_source_color (cr, &splash->color);
gdk_cairo_set_source_rgba (cr, &splash->color);
cairo_move_to (cr, splash->upper_x, splash->upper_y);
pango_cairo_show_layout (cr, splash->upper);
@ -409,7 +409,7 @@ splash_rectangle_union (GdkRectangle *dest,
static void
splash_average_text_area (GimpSplash *splash,
GdkPixbuf *pixbuf,
GdkColor *color)
GdkRGBA *color)
{
const guchar *pixels;
gint rowstride;
@ -464,7 +464,8 @@ splash_average_text_area (GimpSplash *splash,
}
color->red = color->green = color->blue = (luminance << 8 | luminance);
color->red = color->green = color->blue = (luminance << 8 | luminance) / 255.0;
color->alpha = 1.0;
}
static GdkPixbufAnimation *