summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Plazas <kekun.plazas@laposte.net>2020-07-20 12:26:48 +0200
committerAdrien Plazas <kekun.plazas@laposte.net>2020-07-23 14:27:02 +0200
commit2b0b6136bb6571f3bed484c75e95306b1043524d (patch)
tree85c01612dfbd23029a55bb7983b0fd3844b30132
parent5809e061b6fa78e81c60e2e30d1b399be3480a8b (diff)
downloadgnome-contacts-2b0b6136bb6571f3bed484c75e95306b1043524d.tar.gz
Adapt to Hdy.Leaflet changes
-rw-r--r--data/ui/contacts-window.ui3
-rw-r--r--src/contacts-window.vala8
2 files changed, 5 insertions, 6 deletions
diff --git a/data/ui/contacts-window.ui b/data/ui/contacts-window.ui
index 5017321..0987baa 100644
--- a/data/ui/contacts-window.ui
+++ b/data/ui/contacts-window.ui
@@ -361,8 +361,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-swipe-back">True</property>
- <property name="transition-type">over</property>
- <signal name="notify::fold" handler="on_fold" object="ContactsWindow" after="yes" swapped="no"/>
+ <signal name="notify::folded" handler="on_folded" object="ContactsWindow" after="yes" swapped="no"/>
<signal name="notify::child-transition-running" handler="on_child_transition_running" object="ContactsWindow" after="yes" swapped="no"/>
<child>
<object class="GtkStack" id="list_pane_stack">
diff --git a/src/contacts-window.vala b/src/contacts-window.vala
index ec666b8..b7d06cd 100644
--- a/src/contacts-window.vala
+++ b/src/contacts-window.vala
@@ -380,7 +380,7 @@ public class Contacts.Window : Gtk.ApplicationWindow {
}
[GtkCallback]
- private void on_fold () {
+ private void on_folded () {
update_header ();
}
@@ -392,12 +392,12 @@ public class Contacts.Window : Gtk.ApplicationWindow {
private void update_header () {
this.left_header.show_close_button =
- this.content_box.fold == Hdy.Fold.UNFOLDED || this.header.visible_child == this.left_header;
+ !this.content_box.folded || this.header.visible_child == this.left_header;
this.right_header.show_close_button =
- this.content_box.fold == Hdy.Fold.UNFOLDED || this.header.visible_child == this.right_header;
+ !this.content_box.folded || this.header.visible_child == this.right_header;
this.back_revealer.reveal_child =
this.back_revealer.visible =
- this.content_box.fold == Hdy.Fold.FOLDED &&
+ this.content_box.folded &&
!this.cancel_button.visible &&
this.header.visible_child == this.right_header;
}