[aisleriot] sol: Remove baize colour from style
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] sol: Remove baize colour from style
- Date: Mon, 5 Dec 2011 19:02:17 +0000 (UTC)
commit a0d9d534f00e99ffebdec686cff9fe8d07766c07
Author: Christian Persch <chpe gnome org>
Date: Mon Dec 5 10:57:25 2011 +0100
sol: Remove baize colour from style
src/ar-style-gtk.c | 27 +++------------------------
src/ar-style-private.h | 5 ++---
src/ar-style.c | 45 ---------------------------------------------
src/ar-style.h | 3 ---
src/board-noclutter.c | 5 -----
5 files changed, 5 insertions(+), 80 deletions(-)
---
diff --git a/src/ar-style-gtk.c b/src/ar-style-gtk.c
index 068781b..80fdcca 100644
--- a/src/ar-style-gtk.c
+++ b/src/ar-style-gtk.c
@@ -51,9 +51,8 @@ ar_style_provider_new (void)
#endif
static const char css[] =
"" NAME "{\n"
- "-" NAME "-selection-color: " DEFAULT_SELECTION_COLOR_STRING ";\n"
- "-" NAME "-baize-color: " DEFAULT_BAIZE_COLOR_STRING ";\n"
- "background-color: " DEFAULT_BAIZE_COLOR_STRING ";\n"
+ "background-color: " DEFAULT_BACKGROUND_COLOR_STRING ";\n"
+ "-" NAME "-selection-color: " DEFAULT_SELECTION_COLOR_STRING ";\n"
"}\n";
#if 0
"background-image: url('baize.png');\n"
@@ -238,7 +237,7 @@ style_updated_cb (GtkWidget *widget,
{
ArStylePrivate *style_priv = style->priv;
GObject *style_object = G_OBJECT (style);
- GdkRGBA *selection_color, *baize_color;
+ GdkRGBA *selection_color;
int focus_line_width, focus_padding;
gboolean interior_focus;
double card_slot_ratio, card_overhang, card_step;
@@ -257,7 +256,6 @@ style_updated_cb (GtkWidget *widget,
"card-overhang", &card_overhang,
"card-step", &card_step,
"selection-color", &selection_color,
- "baize-color", &baize_color,
NULL);
if (style_priv->interior_focus != interior_focus) {
@@ -303,13 +301,6 @@ style_updated_cb (GtkWidget *widget,
}
gdk_rgba_free (selection_color);
- if (!gdk_rgba_equal (&style_priv->baize_color, baize_color)) {
- style_priv->baize_color = *baize_color;
-
- g_object_notify (style_object, AR_STYLE_PROP_BAIZE_COLOR);
- }
- gdk_rgba_free (baize_color);
-
g_object_thaw_notify (style_object);
}
@@ -337,18 +328,6 @@ _ar_style_gtk_class_install_style_properties (GtkWidgetClass *widget_class)
G_PARAM_STATIC_STRINGS));
/**
- * ArClutterEmbed:baize-color:
- *
- * The card selection colour.
- */
- gtk_widget_class_install_style_property
- (widget_class,
- g_param_spec_boxed ("baize-color", NULL, NULL,
- GDK_TYPE_RGBA,
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS));
-
- /**
* ArClutterEmbed:card-slot-ratio:
*
* The ratio of card to slot size. Note that this is the ratio of
diff --git a/src/ar-style-private.h b/src/ar-style-private.h
index 9f9d33f..d48073d 100644
--- a/src/ar-style-private.h
+++ b/src/ar-style-private.h
@@ -20,11 +20,11 @@
G_BEGIN_DECLS
+static const GdkRGBA default_background_color = { 0. /* red */, 0.3125 /* green */, 0.0625 /* blue */, 1.0 /* alpha */ };
static const GdkRGBA default_selection_color = { 0. /* red */, 0. /* green */, 0.6666 /* blue */, 0.5 /* alpha */ };
-static const GdkRGBA default_baize_color = { 0. /* red */, 0.3125 /* green */, 0.0625 /* blue */, 1.0 /* alpha */ };
+#define DEFAULT_BACKGROUND_COLOR_STRING "rgb(0%,31%,6%)"
#define DEFAULT_SELECTION_COLOR_STRING "rgba(0%,0%,66%,0.5)"
-#define DEFAULT_BAIZE_COLOR_STRING "rgb(0%, 31%,6%)"
/* The proportion of a slot dedicated to the card (horiz or vert). */
#define DEFAULT_CARD_OVERHANG (0.0)
@@ -43,7 +43,6 @@ struct _ArStylePrivate
ArCardTheme* card_theme;
GdkRGBA selection_color;
- GdkRGBA baize_color;
double card_slot_ratio;
double card_overhang;
diff --git a/src/ar-style.c b/src/ar-style.c
index ed8e3d4..cafc201 100644
--- a/src/ar-style.c
+++ b/src/ar-style.c
@@ -25,7 +25,6 @@
enum
{
PROP_0,
- PROP_BAIZE_COLOR,
PROP_CARD_OVERHANG,
PROP_CARD_SLOT_RATIO,
PROP_CARD_STEP,
@@ -59,7 +58,6 @@ ar_style_init (ArStyle *style)
priv = style->priv = G_TYPE_INSTANCE_GET_PRIVATE (style, AR_TYPE_STYLE, ArStylePrivate);
priv->selection_color = default_selection_color;
- priv->baize_color = default_baize_color;
priv->card_slot_ratio = DEFAULT_CARD_SLOT_RATIO;
priv->card_overhang = DEFAULT_CARD_OVERHANG;
priv->card_step = DEFAULT_CARD_STEP;
@@ -102,10 +100,6 @@ ar_style_get_property (GObject *object,
ArStylePrivate *priv = style->priv;
switch (property_id) {
- case PROP_BAIZE_COLOR:
- g_value_set_boxed (value, &priv->baize_color);
- break;
-
case PROP_CARD_OVERHANG:
g_value_set_double (value, ar_style_get_card_overhang (style));
break;
@@ -189,17 +183,6 @@ ar_style_set_property (GObject *object,
ArStylePrivate *priv = style->priv;
switch (property_id) {
- case PROP_BAIZE_COLOR: {
- const GdkRGBA *color;
-
- if ((color = g_value_get_boxed (value)) != NULL) {
- priv->baize_color = *color;
- } else {
- priv->baize_color = default_baize_color;
- }
- break;
- }
-
case PROP_CARD_OVERHANG:
priv->card_overhang = g_value_get_double (value);
break;
@@ -291,19 +274,6 @@ ar_style_class_init (ArStyleClass *klass)
object_class->get_property = ar_style_get_property;
object_class->finalize = ar_style_finalize;
- /**
- * ArStyle:baize-color:
- *
- * The board baize color.
- */
- g_object_class_install_property
- (object_class,
- PROP_BAIZE_COLOR,
- g_param_spec_boxed (AR_STYLE_PROP_BAIZE_COLOR, NULL, NULL,
- GDK_TYPE_RGBA,
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS));
-
g_object_class_install_property
(object_class,
PROP_CARD_SLOT_RATIO,
@@ -794,21 +764,6 @@ ar_style_get_selection_color (ArStyle *style,
}
/**
- * ar_style_get_baize_color:
- * @style: an #ArStyle
- * @color: location to store the color
- *
- */
-void
-ar_style_get_baize_color (ArStyle *style,
- GdkRGBA * const color)
-{
- ArStylePrivate *priv = style->priv;
-
- *color = priv->baize_color;
-}
-
-/**
* ar_style_check_dnd_drag_threshold:
* @style:
* @x1:
diff --git a/src/ar-style.h b/src/ar-style.h
index d29b582..8a34583 100644
--- a/src/ar-style.h
+++ b/src/ar-style.h
@@ -53,7 +53,6 @@ GType ar_style_get_type (void);
ArStyle* ar_style_new (void);
-#define AR_STYLE_PROP_BAIZE_COLOR "baize-color"
#define AR_STYLE_PROP_CARD_SLOT_RATIO "card-slot-prop"
#define AR_STYLE_PROP_CARD_THEME "card-theme"
#define AR_STYLE_PROP_CARD_OVERHANG "card-overhang"
@@ -105,8 +104,6 @@ double ar_style_get_card_step (ArStyle *style);
void ar_style_get_selection_color (ArStyle *style,
GdkRGBA * const color);
-void ar_style_get_baize_color (ArStyle *style,
- GdkRGBA * const color);
gboolean ar_style_check_dnd_drag_threshold (ArStyle *style,
float x1,
diff --git a/src/board-noclutter.c b/src/board-noclutter.c
index 1b7634d..5e696ba 100644
--- a/src/board-noclutter.c
+++ b/src/board-noclutter.c
@@ -2374,11 +2374,6 @@ aisleriot_board_sync_style (ArStyle *style,
redraw_selection = TRUE;
}
- if (realized &&
- (pspec_name == NULL || pspec_name == I_(AR_STYLE_PROP_BAIZE_COLOR))) {
- queue_redraw = TRUE;
- }
-
if (pspec_name == NULL || pspec_name == I_(AR_STYLE_PROP_SHOW_TOOLTIPS)) {
gtk_widget_set_has_tooltip (widget, ar_style_get_show_tooltips (priv->style));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]