[nautilus/wip/toolbar-start-end: 8/8] 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: 8/8] toolbar: Use GtkRevealer for sidebar button
- Date: Sat, 6 Aug 2022 23:55:32 +0000 (UTC)
commit f18ad7e6635bd5c961999032f1b748cd745bda39
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]