summaryrefslogtreecommitdiff
path: root/src/resources/ui
diff options
context:
space:
mode:
authorChristopher Davis <christopherdavis@gnome.org>2022-07-29 23:45:07 -0400
committerAntónio Fernandes <antoniof@gnome.org>2022-08-06 23:55:31 +0000
commitf18ad7e6635bd5c961999032f1b748cd745bda39 (patch)
tree97918d07bf8353e67c6dd5925a14129d81520eda /src/resources/ui
parenta8eb74c20cd66e940dc109809dacb84cb6d5664d (diff)
downloadnautilus-f18ad7e6635bd5c961999032f1b748cd745bda39.tar.gz
toolbar: Use GtkRevealer for sidebar button
Since we don't need to deal with the automatic spacing from GtkHeaderBar, we can take advantage of GtkRevealer to get a smooth transition for the button's visibility. This also gets rid of a flicker and warning from GTK.
Diffstat (limited to 'src/resources/ui')
-rw-r--r--src/resources/ui/nautilus-toolbar.ui15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/resources/ui/nautilus-toolbar.ui b/src/resources/ui/nautilus-toolbar.ui
index b5f150f08..9e4bf64e8 100644
--- a/src/resources/ui/nautilus-toolbar.ui
+++ b/src/resources/ui/nautilus-toolbar.ui
@@ -120,11 +120,16 @@
<child type="start">
<object class="GtkBox">
<child>
- <object class="GtkToggleButton" id="show_sidebar_button">
- <property name="visible" bind-source="NautilusToolbar" bind-property="show-sidebar-button" bind-flags="bidirectional|sync-create"/>
- <property name="active" bind-source="NautilusToolbar" bind-property="sidebar-button-active" bind-flags="bidirectional|sync-create"/>
- <property name="tooltip-text" translatable="yes">Show sidebar</property>
- <property name="icon-name">sidebar-show-symbolic</property>
+ <object class="GtkRevealer">
+ <property name="reveal-child" bind-source="NautilusToolbar" bind-property="show-sidebar-button" bind-flags="bidirectional|sync-create"/>
+ <property name="transition-type">slide-right</property>
+ <property name="child">
+ <object class="GtkToggleButton" id="show_sidebar_button">
+ <property name="active" bind-source="NautilusToolbar" bind-property="sidebar-button-active" bind-flags="bidirectional|sync-create"/>
+ <property name="tooltip-text" translatable="yes">Show sidebar</property>
+ <property name="icon-name">sidebar-show-symbolic</property>
+ </object>
+ </property>
</object>
</child>
<child>