diff options
author | Alexander Larsson <alexl@redhat.com> | 2005-07-06 11:45:08 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2005-07-06 11:45:08 +0000 |
commit | fdecd6e0f6f73b3d19a1be57b9c93646deec982a (patch) | |
tree | e8c2c1aff793a9d4425ce210cda82d66e044db06 /libnautilus-private/nautilus-icon-container.c | |
parent | 2c923fb5c18295e4a4c95a362fc98915ad5b9652 (diff) | |
download | nautilus-fdecd6e0f6f73b3d19a1be57b9c93646deec982a.tar.gz |
Add normal_alpha style property that is used when frame_text is on.
2005-07-06 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-icon-canvas-item.c:
* libnautilus-private/nautilus-icon-container.c:
* libnautilus-private/nautilus-icon-private.h:
Add normal_alpha style property that is used when
frame_text is on.
Patch from Benjamin Berg <benjamin@sipsolutions.net>
Diffstat (limited to 'libnautilus-private/nautilus-icon-container.c')
-rw-r--r-- | libnautilus-private/nautilus-icon-container.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c index b8cef7934..7aedf7b42 100644 --- a/libnautilus-private/nautilus-icon-container.c +++ b/libnautilus-private/nautilus-icon-container.c @@ -115,6 +115,7 @@ #define DEFAULT_SELECTION_BOX_ALPHA 0x40 #define DEFAULT_HIGHLIGHT_ALPHA 0xff +#define DEFAULT_NORMAL_ALPHA 0xff #define DEFAULT_LIGHT_INFO_COLOR 0xAAAAFD #define DEFAULT_DARK_INFO_COLOR 0x33337F @@ -4311,6 +4312,13 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class) DEFAULT_HIGHLIGHT_ALPHA, G_PARAM_READABLE)); gtk_widget_class_install_style_property (widget_class, + g_param_spec_uchar ("normal_alpha", + _("Normal Alpha"), + _("Opacity of the normal icons if frame_text is set"), + 0, 0xff, + DEFAULT_NORMAL_ALPHA, + G_PARAM_READABLE)); + gtk_widget_class_install_style_property (widget_class, g_param_spec_boxed ("light_info_color", "Light Info Color", "Color used for information text against a dark background", @@ -6586,7 +6594,7 @@ nautilus_icon_container_theme_changed (gpointer user_data) { NautilusIconContainer *container; GtkStyle *style; - guchar highlight_alpha; + guchar highlight_alpha, normal_alpha; container = NAUTILUS_ICON_CONTAINER (user_data); @@ -6614,6 +6622,17 @@ nautilus_icon_container_theme_changed (gpointer user_data) style->base[GTK_STATE_ACTIVE].green >> 8, style->base[GTK_STATE_ACTIVE].blue >> 8, highlight_alpha); + + /* load the normal color */ + gtk_widget_style_get (GTK_WIDGET (container), + "normal_alpha", &normal_alpha, + NULL); + + container->details->normal_color_rgba = + EEL_RGBA_COLOR_PACK (style->base[GTK_STATE_NORMAL].red >> 8, + style->base[GTK_STATE_NORMAL].green >> 8, + style->base[GTK_STATE_NORMAL].blue >> 8, + normal_alpha); setup_label_gcs (container); } |