[fractal/wip/cdavis/next-style-cleanup: 2/6] ui: Use revealers for back buttons
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal/wip/cdavis/next-style-cleanup: 2/6] ui: Use revealers for back buttons
- Date: Fri, 25 Jun 2021 21:23:02 +0000 (UTC)
commit a9f25188cf2c4ffba1bbf313b412dcd51ed33d6b
Author: Christopher Davis <christopherdavis gnome org>
Date: Wed Jun 23 18:31:47 2021 -0700
ui: Use revealers for back buttons
In order to have nice transitions and consistent
sizing, we should use GtkRevealer with a crossfade
transition instead of using the `visible` prop
of the back buttons.
data/resources/ui/content-explore.ui | 13 +++++++++----
data/resources/ui/content-invite.ui | 13 +++++++++----
data/resources/ui/content-room-history.ui | 13 +++++++++----
3 files changed, 27 insertions(+), 12 deletions(-)
---
diff --git a/data/resources/ui/content-explore.ui b/data/resources/ui/content-explore.ui
index 76dc2fab..b3f69d78 100644
--- a/data/resources/ui/content-explore.ui
+++ b/data/resources/ui/content-explore.ui
@@ -10,10 +10,15 @@
<object class="AdwHeaderBar" id="headerbar">
<property name="show-start-title-buttons" bind-source="ContentExplore" bind-property="compact"
bind-flags="sync-create"/>
<child type="start">
- <object class="GtkButton" id="back">
- <property name="visible" bind-source="ContentExplore" bind-property="compact"
bind-flags="sync-create"/>
- <property name="icon-name">go-previous-symbolic</property>
- <property name="action-name">content.go-back</property>
+ <object class="GtkRevealer">
+ <property name="transition-type">crossfade</property>
+ <property name="reveal-child" bind-source="ContentExplore" bind-property="compact"
bind-flags="sync-create"/>
+ <property name="child">
+ <object class="GtkButton" id="back">
+ <property name="icon-name">go-previous-symbolic</property>
+ <property name="action-name">content.go-back</property>
+ </object>
+ </property>
</object>
</child>
<child type="title">
diff --git a/data/resources/ui/content-invite.ui b/data/resources/ui/content-invite.ui
index 3e59ff07..7c8b5d0c 100644
--- a/data/resources/ui/content-invite.ui
+++ b/data/resources/ui/content-invite.ui
@@ -10,10 +10,15 @@
<object class="AdwHeaderBar" id="headerbar">
<property name="show-start-title-buttons" bind-source="ContentInvite" bind-property="compact"
bind-flags="sync-create"/>
<child type="start">
- <object class="GtkButton" id="back">
- <property name="visible" bind-source="ContentInvite" bind-property="compact"
bind-flags="sync-create"/>
- <property name="icon-name">go-previous-symbolic</property>
- <property name="action-name">content.go-back</property>
+ <object class="GtkRevealer">
+ <property name="transition-type">crossfade</property>
+ <property name="reveal-child" bind-source="ContentInvite" bind-property="compact"
bind-flags="sync-create"/>
+ <property name="child">
+ <object class="GtkButton" id="back">
+ <property name="icon-name">go-previous-symbolic</property>
+ <property name="action-name">content.go-back</property>
+ </object>
+ </property>
</object>
</child>
<child type="title">
diff --git a/data/resources/ui/content-room-history.ui b/data/resources/ui/content-room-history.ui
index b420cb24..977d8238 100644
--- a/data/resources/ui/content-room-history.ui
+++ b/data/resources/ui/content-room-history.ui
@@ -19,10 +19,15 @@
<object class="AdwHeaderBar" id="headerbar">
<property name="show-start-title-buttons" bind-source="ContentRoomHistory"
bind-property="compact" bind-flags="sync-create"/>
<child type="start">
- <object class="GtkButton" id="back">
- <property name="visible" bind-source="ContentRoomHistory" bind-property="compact"
bind-flags="sync-create"/>
- <property name="icon-name">go-previous-symbolic</property>
- <property name="action-name">content.go-back</property>
+ <object class="GtkRevealer">
+ <property name="transition-type">crossfade</property>
+ <property name="reveal-child" bind-source="ContentRoomHistory" bind-property="compact"
bind-flags="sync-create"/>
+ <property name="child">
+ <object class="GtkButton" id="back">
+ <property name="icon-name">go-previous-symbolic</property>
+ <property name="action-name">content.go-back</property>
+ </object>
+ </property>
</object>
</child>
<child type="title">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]