[gnome-builder] sourceview: transition opacity with animation



commit c58df9c6f0fa22e6b301dd3c06788475adb8b426
Author: Christian Hergert <chergert redhat com>
Date:   Thu May 2 17:32:03 2019 -0700

    sourceview: transition opacity with animation
    
    This makes the transition more obvious to the user the first time they
    see it, otherwise it can be jarrying what actually happened.

 src/libide/sourceview/ide-source-view.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/sourceview/ide-source-view.c b/src/libide/sourceview/ide-source-view.c
index 9eecbbada..2d29818ee 100644
--- a/src/libide/sourceview/ide-source-view.c
+++ b/src/libide/sourceview/ide-source-view.c
@@ -2202,9 +2202,9 @@ ide_source_view_key_release_event (GtkWidget   *widget,
           ide_completion_is_visible (priv->completion))
         {
           if (gtk_widget_get_opacity (GTK_WIDGET (display)) == 1.0)
-            gtk_widget_set_opacity (GTK_WIDGET (display), 0.1);
+            dzl_object_animate (display, DZL_ANIMATION_LINEAR, 250, NULL, "opacity", 0.1, NULL);
           else
-            gtk_widget_set_opacity (GTK_WIDGET (display), 1.0);
+            dzl_object_animate (display, DZL_ANIMATION_LINEAR, 250, NULL, "opacity", 1.0, NULL);
         }
 
       priv->did_ctrl_opacity = FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]