[nautilus/wip/toolbar-start-end: 6/6] toolbar: Use GtkRevealer for sidebar button
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/toolbar-start-end: 6/6] toolbar: Use GtkRevealer for sidebar button
- Date: Sat, 6 Aug 2022 22:45:47 +0000 (UTC)
commit 2acb93f50b830c71bbfb174e5c178badce0473fc
Author: Christopher Davis <christopherdavis gnome org>
Date: Fri Jul 29 23:45:07 2022 -0400
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.
src/resources/ui/nautilus-toolbar.ui | 15 ++++++++++-----
1 file 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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]