diff options
author | Jakub Steiner <jimmac@gmail.com> | 2015-08-26 13:12:41 +0200 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2015-08-29 00:01:43 +0200 |
commit | 610c991ca79ad53a77effb32e67eb79341160b2b (patch) | |
tree | aac571ff78599483ee63bed7803f79db19e4c8b2 /src/nautilus-toolbar.c | |
parent | 39f9de346642b8d29372d050e0876fc6be91aab3 (diff) | |
download | nautilus-610c991ca79ad53a77effb32e67eb79341160b2b.tar.gz |
toolbar: adjust animation colors
Make the highlight more apparent
- it seems we can't do animation-direction so I've made the
highlight last longer by using two keyframes, since we cannot
do the classic ping-pong animation and adjusting the ease-out
- button gradient colors are still mostly hardcoded as no
color ops available in css. :(
https://bugzilla.gnome.org/show_bug.cgi?id=753728
Diffstat (limited to 'src/nautilus-toolbar.c')
-rw-r--r-- | src/nautilus-toolbar.c | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c index 1874446ef..b3660d1ab 100644 --- a/src/nautilus-toolbar.c +++ b/src/nautilus-toolbar.c @@ -40,8 +40,7 @@ #include <math.h> #define OPERATION_MINIMUM_TIME 2 //s -#define NEEDS_ATTENTION_ANIMATION_TIMEOUT 1000 //ms -#define NEEDS_ATTENTION_ANIMATION_MULTIPLE_TIMEOUT 3000 //ms +#define NEEDS_ATTENTION_ANIMATION_TIMEOUT 2000 //ms #define REMOVE_FINISHED_OPERATIONS_TIEMOUT 3 //s typedef enum { @@ -430,19 +429,6 @@ schedule_remove_finished_operations (NautilusToolbar *self) } static gboolean -remove_operations_button_attention_style_multiple (NautilusToolbar *self) -{ - GtkStyleContext *style_context; - - style_context = gtk_widget_get_style_context (self->priv->operations_button); - gtk_style_context_remove_class (style_context, - "nautilus-operations-button-needs-attention-multiple"); - self->priv->operations_button_attention_timeout_id = 0; - - return G_SOURCE_REMOVE; -} - -static gboolean remove_operations_button_attention_style (NautilusToolbar *self) { GtkStyleContext *style_context; @@ -463,7 +449,7 @@ add_operations_button_attention_style (NautilusToolbar *self) style_context = gtk_widget_get_style_context (self->priv->operations_button); remove_operations_button_attention_style (self); - remove_operations_button_attention_style_multiple (self); + remove_operations_button_attention_style (self); gtk_style_context_add_class (style_context, "nautilus-operations-button-needs-attention"); @@ -473,23 +459,6 @@ add_operations_button_attention_style (NautilusToolbar *self) } static void -add_operations_button_attention_multiple_style (NautilusToolbar *self) -{ - GtkStyleContext *style_context; - - style_context = gtk_widget_get_style_context (self->priv->operations_button); - - remove_operations_button_attention_style (self); - remove_operations_button_attention_style_multiple (self); - - gtk_style_context_add_class (style_context, - "nautilus-operations-button-needs-attention-multiple"); - self->priv->operations_button_attention_timeout_id = g_timeout_add (NEEDS_ATTENTION_ANIMATION_MULTIPLE_TIMEOUT, - (GSourceFunc) remove_operations_button_attention_style_multiple, - self); -} - -static void on_progress_info_cancelled (NautilusToolbar *self) { /* Update the pie chart progress */ @@ -593,7 +562,7 @@ update_operations (NautilusToolbar *self) */ if (total_remaining_time > OPERATION_MINIMUM_TIME && !gtk_revealer_get_reveal_child (GTK_REVEALER (self->priv->operations_revealer))) { - add_operations_button_attention_multiple_style (self); + add_operations_button_attention_style (self); gtk_revealer_set_reveal_child (GTK_REVEALER (self->priv->operations_revealer), TRUE); gtk_widget_queue_draw (self->priv->operations_icon); |