mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 03:10:09 +00:00
style: Do not allocate colors anymore
This commit is contained in:
parent
a50843e160
commit
09fbed7bc9
@ -1275,12 +1275,10 @@ gtk_style_real_realize (GtkStyle *style)
|
||||
style->black.red = 0x0000;
|
||||
style->black.green = 0x0000;
|
||||
style->black.blue = 0x0000;
|
||||
gdk_colormap_alloc_color (style->colormap, &style->black, FALSE, TRUE);
|
||||
|
||||
style->white.red = 0xffff;
|
||||
style->white.green = 0xffff;
|
||||
style->white.blue = 0xffff;
|
||||
gdk_colormap_alloc_color (style->colormap, &style->white, FALSE, TRUE);
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
@ -1288,31 +1286,6 @@ gtk_style_real_realize (GtkStyle *style)
|
||||
style->bg_pixmap[i] = load_bg_image (style->colormap,
|
||||
&style->bg[i],
|
||||
style->rc_style->bg_pixmap_name[i]);
|
||||
|
||||
if (!gdk_colormap_alloc_color (style->colormap, &style->fg[i], FALSE, TRUE))
|
||||
g_warning ("unable to allocate color: ( %d %d %d )",
|
||||
style->fg[i].red, style->fg[i].green, style->fg[i].blue);
|
||||
if (!gdk_colormap_alloc_color (style->colormap, &style->bg[i], FALSE, TRUE))
|
||||
g_warning ("unable to allocate color: ( %d %d %d )",
|
||||
style->bg[i].red, style->bg[i].green, style->bg[i].blue);
|
||||
if (!gdk_colormap_alloc_color (style->colormap, &style->light[i], FALSE, TRUE))
|
||||
g_warning ("unable to allocate color: ( %d %d %d )",
|
||||
style->light[i].red, style->light[i].green, style->light[i].blue);
|
||||
if (!gdk_colormap_alloc_color (style->colormap, &style->dark[i], FALSE, TRUE))
|
||||
g_warning ("unable to allocate color: ( %d %d %d )",
|
||||
style->dark[i].red, style->dark[i].green, style->dark[i].blue);
|
||||
if (!gdk_colormap_alloc_color (style->colormap, &style->mid[i], FALSE, TRUE))
|
||||
g_warning ("unable to allocate color: ( %d %d %d )",
|
||||
style->mid[i].red, style->mid[i].green, style->mid[i].blue);
|
||||
if (!gdk_colormap_alloc_color (style->colormap, &style->text[i], FALSE, TRUE))
|
||||
g_warning ("unable to allocate color: ( %d %d %d )",
|
||||
style->text[i].red, style->text[i].green, style->text[i].blue);
|
||||
if (!gdk_colormap_alloc_color (style->colormap, &style->base[i], FALSE, TRUE))
|
||||
g_warning ("unable to allocate color: ( %d %d %d )",
|
||||
style->base[i].red, style->base[i].green, style->base[i].blue);
|
||||
if (!gdk_colormap_alloc_color (style->colormap, &style->text_aa[i], FALSE, TRUE))
|
||||
g_warning ("unable to allocate color: ( %d %d %d )",
|
||||
style->text_aa[i].red, style->text_aa[i].green, style->text_aa[i].blue);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1331,15 +1304,6 @@ gtk_style_real_unrealize (GtkStyle *style)
|
||||
|
||||
}
|
||||
|
||||
gdk_colormap_free_colors (style->colormap, style->fg, 5);
|
||||
gdk_colormap_free_colors (style->colormap, style->bg, 5);
|
||||
gdk_colormap_free_colors (style->colormap, style->light, 5);
|
||||
gdk_colormap_free_colors (style->colormap, style->dark, 5);
|
||||
gdk_colormap_free_colors (style->colormap, style->mid, 5);
|
||||
gdk_colormap_free_colors (style->colormap, style->text, 5);
|
||||
gdk_colormap_free_colors (style->colormap, style->base, 5);
|
||||
gdk_colormap_free_colors (style->colormap, style->text_aa, 5);
|
||||
|
||||
style_unrealize_cursors (style);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user