[gnome-maps/wip/cdavis/post-port-cleanups: 21/29] placesPopover: Use libadwaita menu styles
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/cdavis/post-port-cleanups: 21/29] placesPopover: Use libadwaita menu styles
- Date: Sun, 21 Aug 2022 23:37:13 +0000 (UTC)
commit 5d835fbac2048bb80fe84997ae84715e3ff7ba1b
Author: Christopher Davis <christopherdavis gnome org>
Date: Sun Aug 21 13:09:28 2022 -0400
placesPopover: Use libadwaita menu styles
data/ui/place-popover.ui | 90 ++++++++++++++++++++++--------------------------
src/placePopover.js | 8 -----
2 files changed, 42 insertions(+), 56 deletions(-)
---
diff --git a/data/ui/place-popover.ui b/data/ui/place-popover.ui
index f4fed434..d0fdcf33 100644
--- a/data/ui/place-popover.ui
+++ b/data/ui/place-popover.ui
@@ -6,60 +6,54 @@
<property name="hexpand">False</property>
<property name="height-request">320</property>
<style>
- <class name="maps-popover"/>
+ <class name="menu"/>
</style>
- <child>
- <object class="GtkGrid" id="mainGrid">
- <property name="focusable">1</property>
- <property name="orientation">vertical</property>
+ <property name="child">
+ <object class="GtkStack" id="stack">
+ <property name="transition-type">crossfade</property>
+ <style>
+ <class name="maps-stack"/>
+ </style>
<child>
- <object class="GtkStack" id="stack">
- <property name="transition-type">crossfade</property>
+ <object class="GtkScrolledWindow" id="scrolledWindow">
+ <property name="hscrollbar_policy">never</property>
+ <property name="child">
+ <object class="GtkListBox" id="list">
+ <property name="hexpand">1</property>
+ <property name="vexpand">1</property>
+ </object>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinner" id="spinner">
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="width_request">16</property>
+ <property name="height_request">16</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="noResultsLabel">
+ <property name="label" translatable="1">No results found</property>
+ <property name="width_request">16</property>
+ <property name="height_request">16</property>
<style>
- <class name="maps-stack"/>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="errorLabel">
+ <property name="label" translatable="1">An error has occurred</property>
+ <property name="width_request">16</property>
+ <property name="height_request">16</property>
+ <style>
+ <class name="dim-label"/>
</style>
- <child>
- <object class="GtkScrolledWindow" id="scrolledWindow">
- <property name="hscrollbar_policy">never</property>
- <property name="child">
- <object class="GtkListBox" id="list">
- <property name="hexpand">1</property>
- <property name="vexpand">1</property>
- </object>
- </property>
- </object>
- </child>
- <child>
- <object class="GtkSpinner" id="spinner">
- <property name="halign">center</property>
- <property name="valign">center</property>
- <property name="width_request">16</property>
- <property name="height_request">16</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="noResultsLabel">
- <property name="label" translatable="1">No results found</property>
- <property name="width_request">16</property>
- <property name="height_request">16</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="errorLabel">
- <property name="label" translatable="1">An error has occurred</property>
- <property name="width_request">16</property>
- <property name="height_request">16</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
</object>
</child>
</object>
- </child>
+ </property>
</template>
</interface>
diff --git a/src/placePopover.js b/src/placePopover.js
index c1abce6a..836ad49a 100644
--- a/src/placePopover.js
+++ b/src/placePopover.js
@@ -45,14 +45,6 @@ export class PlacePopover extends SearchPopover {
this.emit('selected', row.place);
});
- this._list.set_header_func((row, before) => {
- let header = new Gtk.Separator();
- if (before)
- row.set_header(header);
- else
- row.set_header(null);
- });
-
let rowHeight = PlaceListRow.ROW_HEIGHT;
this._scrolledWindow.min_content_height = numVisible * rowHeight + 6;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]