summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-08-11 21:35:24 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-08-14 23:42:48 -0400
commit0f871be508ba46f6feb67ec9af1b20e38fa957ac (patch)
tree76808131f39982ac92818db26f2c637a6ab56f37
parente02acc7d71c458c960157a57e495e1fb12d51fd6 (diff)
downloadgtk+-0f871be508ba46f6feb67ec9af1b20e38fa957ac.tar.gz
GtkLabel: Add alpha support for buildable attributes
Make it possible to set foreground or background alpha in the builder ui support for Pango attributes.
-rw-r--r--gtk/gtklabel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 592d8bac1d..a18b798c18 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -1541,6 +1541,14 @@ G_GNUC_END_IGNORE_DEPRECATIONS
case PANGO_ATTR_FONT_FEATURES:
attribute = pango_attr_font_features_new (value);
break;
+ case PANGO_ATTR_FOREGROUND_ALPHA:
+ if (gtk_builder_value_from_string_type (builder, G_TYPE_INT, value, &val, error))
+ attribute = pango_attr_foreground_alpha_new ((guint16)value);
+ break;
+ case PANGO_ATTR_BACKGROUND_ALPHA:
+ if (gtk_builder_value_from_string_type (builder, G_TYPE_INT, value, &val, error))
+ attribute = pango_attr_background_alpha_new ((guint16)value);
+ break;
case PANGO_ATTR_INVALID:
default:
break;