[dconf-editor] Disable some animations on startup.



commit 2fa74fd1861a95240430737b2dd71feba520183e
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Sep 13 21:22:59 2018 +0200

    Disable some animations on startup.

 editor/dconf-editor.css  | 8 ++++++--
 editor/dconf-editor.ui   | 1 +
 editor/dconf-window.vala | 2 ++
 3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/editor/dconf-editor.css b/editor/dconf-editor.css
index b6fd78c..2267741 100644
--- a/editor/dconf-editor.css
+++ b/editor/dconf-editor.css
@@ -264,11 +264,15 @@ list.keys-list > grid.big-popover.dim-label.vertical + grid.vertical {
   padding:2px 4px;
   border-style:solid;
   border-color:transparent;
-  transition:border-bottom-color 0.3s;
+  transition:border-bottom-color 0.3s,
+             padding             0.2s;  /* needs to be a bit faster */
+}
+
+.small-window.startup .pathbar > button > .item { /* class remove after 0.3s */
+  transition:padding             0;
 }
 
 .small-window .pathbar > button > .item {
-  transition:padding             0.3s;  /* here because the class is applied on startup */
   padding:2px 1px;
 }
 
diff --git a/editor/dconf-editor.ui b/editor/dconf-editor.ui
index eb9f9d9..d83f9ef 100644
--- a/editor/dconf-editor.ui
+++ b/editor/dconf-editor.ui
@@ -13,6 +13,7 @@
     <signal name="destroy" handler="on_destroy"/>
     <style>
       <class name="dconf-editor"/>
+      <class name="startup"/>
     </style>
     <child type="titlebar">
       <object class="GtkHeaderBar">
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index db06998..ee0c5ac 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -190,6 +190,8 @@ private class DConfWindow : ApplicationWindow
             request_object (startup_path, ModelUtils.undefined_context_id, true, (!) schema);
         else
             request_object (startup_path, ModelUtils.undefined_context_id, true);
+
+        Timeout.add (300, () => { this.get_style_context ().remove_class ("startup"); return Source.REMOVE; 
});
     }
 
     private void prepare_model ()


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