[gnome-maps/wip/cdavis/post-port-cleanups: 15/22] placesPopover: Remove arrow




commit 25864832b315ef4f4175139b77e4e6a8673dbfe3
Author: Christopher Davis <christopherdavis gnome org>
Date:   Sun Aug 21 13:52:58 2022 -0400

    placesPopover: Remove arrow
    
    Suggestion popovers shouldn't have arrows. This commit
    sets `has-arrow` to false uses CSS padding to get the
    right spacing.

 data/gnome-maps.css      | 3 +++
 data/ui/place-popover.ui | 1 +
 src/searchPopover.js     | 2 ++
 3 files changed, 6 insertions(+)
---
diff --git a/data/gnome-maps.css b/data/gnome-maps.css
index 949f62e6..786c8308 100644
--- a/data/gnome-maps.css
+++ b/data/gnome-maps.css
@@ -109,3 +109,6 @@
   background-color: transparent;
 }
 
+.suggestions {
+    padding-top: 6px;
+}
\ No newline at end of file
diff --git a/data/ui/place-popover.ui b/data/ui/place-popover.ui
index d0fdcf33..46f5bcc3 100644
--- a/data/ui/place-popover.ui
+++ b/data/ui/place-popover.ui
@@ -4,6 +4,7 @@
   <template class="Gjs_PlacePopover" parent="Gjs_SearchPopover">
     <property name="visible">False</property>
     <property name="hexpand">False</property>
+    <property name="has-arrow">False</property>
     <property name="height-request">320</property>
     <style>
       <class name="menu"/>
diff --git a/src/searchPopover.js b/src/searchPopover.js
index 423d8ff7..919eec3f 100644
--- a/src/searchPopover.js
+++ b/src/searchPopover.js
@@ -50,6 +50,8 @@ export class SearchPopover extends Gtk.Popover {
                                          () => this._list.unselect_all());
 
         this._numResults = 0;
+
+        this.add_css_class('suggestions');
     }
 
     _propagateKeys(controller, keyval, keycode, state) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]