diff options
author | Alice Mikhaylenko <alexm@gnome.org> | 2023-05-02 15:18:53 +0400 |
---|---|---|
committer | Alice Mikhaylenko <alexm@gnome.org> | 2023-05-02 15:23:41 +0400 |
commit | 241cc988a6f638431df060e9ec45f0c5a3f370f9 (patch) | |
tree | 1cbe40c9f4191377cc0906f5284ea9ffe6e38235 | |
parent | a7f25217fb66194b28177caef9a0d0a33044479d (diff) | |
download | gnome-contacts-wip/cdavis/dual-pane-adaptive-states.tar.gz |
-rw-r--r-- | data/style.css | 5 | ||||
-rw-r--r-- | data/ui/contacts-main-window.ui | 22 | ||||
-rw-r--r-- | src/contacts-main-window.vala | 6 |
3 files changed, 16 insertions, 17 deletions
diff --git a/data/style.css b/data/style.css index 28fc8b1..8d97ee5 100644 --- a/data/style.css +++ b/data/style.css @@ -7,11 +7,6 @@ background-color: transparent; } -/* The search entry to filter the list of contacts */ -.contacts-filter-entry { - margin: 3px 6px; -} - /* The link suggestion widget */ .contacts-link-suggestion { border-top: 1px solid @borders; diff --git a/data/ui/contacts-main-window.ui b/data/ui/contacts-main-window.ui index c5faa11..2d4f433 100644 --- a/data/ui/contacts-main-window.ui +++ b/data/ui/contacts-main-window.ui @@ -109,11 +109,11 @@ <child> <object class="AdwToastOverlay" id="toast_overlay"> <child> - <object class="AdwDualPaneView" id="content_box"> + <object class="AdwNavigationSplitView" id="content_box"> <signal name="notify::folded" handler="on_folded"/> <signal name="notify::content-visible" handler="on_content_visible"/> <property name="sidebar"> - <object class="AdwBrowsingViewChild" id="list_pane_page"> + <object class="AdwNavigationViewChild" id="list_pane_page"> <property name="title" translatable="yes">Contacts</property> <property name="name">list-pane</property> <property name="child"> @@ -155,12 +155,16 @@ </object> </child> <child type="top"> - <object class="GtkSearchEntry" id="filter_entry"> - <property name="placeholder-text" translatable="yes">Search contacts</property> - <signal name="search-changed" handler="filter_entry_changed"/> + <object class="AdwBin"> <style> - <class name="contacts-filter-entry"/> + <class name="toolbar"/> </style> + <property name="child"> + <object class="GtkSearchEntry" id="filter_entry"> + <property name="placeholder-text" translatable="yes">Search contacts</property> + <signal name="search-changed" handler="filter_entry_changed"/> + </object> + </property> </object> </child> <child> @@ -240,7 +244,7 @@ </property> <property name="content"> - <object class="AdwBrowsingViewChild" id="contact_pane_page"> + <object class="AdwNavigationViewChild" id="contact_pane_page"> <property name="name">contact-pane</property> <property name="child"> <object class="AdwToolbarView"> @@ -307,8 +311,8 @@ </object> </child> <child> - <object class="AdwAdaptiveState"> - <condition type="max-width">700</condition> + <object class="AdwBreakpoint"> + <condition>max-width: 700px</condition> <setter object="content_box" property="folded">True</setter> </object> </child> diff --git a/src/contacts-main-window.vala b/src/contacts-main-window.vala index 6f44337..5f15cb6 100644 --- a/src/contacts-main-window.vala +++ b/src/contacts-main-window.vala @@ -41,13 +41,13 @@ public class Contacts.MainWindow : Adw.ApplicationWindow { }; [GtkChild] - private unowned Adw.DualPaneView content_box; + private unowned Adw.NavigationSplitView content_box; [GtkChild] private unowned Gtk.Stack list_pane_stack; [GtkChild] private unowned Gtk.Overlay contact_pane_container; [GtkChild] - private unowned Adw.BrowsingViewChild list_pane_page; + private unowned Adw.NavigationViewChild list_pane_page; [GtkChild] private unowned Gtk.Widget list_pane; [GtkChild] @@ -57,7 +57,7 @@ public class Contacts.MainWindow : Adw.ApplicationWindow { private unowned ContactList contacts_list; [GtkChild] - private unowned Adw.BrowsingViewChild contact_pane_page; + private unowned Adw.NavigationViewChild contact_pane_page; private ContactPane contact_pane; [GtkChild] private unowned Adw.HeaderBar right_header; |