[gtk+/wip/colorchooser-v2: 19/77] Fix a few problems with custom color replacement
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/colorchooser-v2: 19/77] Fix a few problems with custom color replacement
- Date: Thu, 9 Feb 2012 21:27:55 +0000 (UTC)
commit 81b6add8bc97457436c096f634ac41b86c382586
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Feb 1 02:00:21 2012 -0500
Fix a few problems with custom color replacement
We were allowing one too many custom colors in, and when one
of them was dropped, we did not update the shape of the penultimate
one.
gtk/gtkcolorchooserwidget.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcolorchooserwidget.c b/gtk/gtkcolorchooserwidget.c
index 04ac168..7888d10 100644
--- a/gtk/gtkcolorchooserwidget.c
+++ b/gtk/gtkcolorchooserwidget.c
@@ -483,9 +483,13 @@ add_custom_color (GtkColorChooserWidget *cc,
GtkWidget *last;
GtkWidget *p;
- last = gtk_grid_get_child_at (GTK_GRID (cc->priv->custom), 9, 0);
+ last = gtk_grid_get_child_at (GTK_GRID (cc->priv->custom), 8, 0);
if (last)
- gtk_container_remove (GTK_CONTAINER (cc->priv->custom), last);
+ {
+ gtk_container_remove (GTK_CONTAINER (cc->priv->custom), last);
+ last = gtk_grid_get_child_at (GTK_GRID (cc->priv->custom), 7, 0);
+ gtk_color_swatch_set_corner_radii (GTK_COLOR_SWATCH (last), 1, 10, 10, 1);
+ }
gtk_color_swatch_set_corner_radii (GTK_COLOR_SWATCH (cc->priv->button), 10, 1, 1, 10);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]