[gnome-builder/wip/exalm/lists: 7/7] plugins/symbol-tree: Use menu style for the popover




commit 307e8c6188225a2c38297e1f54e12030d1839cf6
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Jul 25 08:43:06 2022 +0400

    plugins/symbol-tree: Use menu style for the popover

 src/libide/gui/style.css                          |  4 ++
 src/plugins/symbol-tree/gbp-symbol-popover-row.ui |  4 --
 src/plugins/symbol-tree/gbp-symbol-popover.ui     | 45 +++++++++++++----------
 3 files changed, 29 insertions(+), 24 deletions(-)
---
diff --git a/src/libide/gui/style.css b/src/libide/gui/style.css
index e375cc7be..62fffdb3c 100644
--- a/src/libide/gui/style.css
+++ b/src/libide/gui/style.css
@@ -70,6 +70,10 @@ scrolledwindow.shadow-when-scroll undershoot.top {
   box-shadow: inset 0px 5px 14px -14px rgba(0,0,0,.9);
 }
 
+scrolledwindow.bottom-shadow-when-scroll undershoot.bottom {
+  box-shadow: inset 0px -5px 14px -14px rgba(0,0,0,.9);
+}
+
 button.pill.small {
   font-size: .83333em;
   border-radius: 99px;
diff --git a/src/plugins/symbol-tree/gbp-symbol-popover-row.ui 
b/src/plugins/symbol-tree/gbp-symbol-popover-row.ui
index 3e339354e..fbc6f3715 100644
--- a/src/plugins/symbol-tree/gbp-symbol-popover-row.ui
+++ b/src/plugins/symbol-tree/gbp-symbol-popover-row.ui
@@ -9,10 +9,6 @@
         <property name="child">
           <object class="GtkBox">
             <property name="spacing">6</property>
-            <property name="margin-top">3</property>
-            <property name="margin-bottom">3</property>
-            <property name="margin-start">3</property>
-            <property name="margin-end">3</property>
             <child>
               <object class="GtkImage">
                 <binding name="icon-name">
diff --git a/src/plugins/symbol-tree/gbp-symbol-popover.ui b/src/plugins/symbol-tree/gbp-symbol-popover.ui
index c99333589..b3cc33787 100644
--- a/src/plugins/symbol-tree/gbp-symbol-popover.ui
+++ b/src/plugins/symbol-tree/gbp-symbol-popover.ui
@@ -2,32 +2,33 @@
 <interface>
   <template class="GbpSymbolPopover" parent="GtkPopover">
     <property name="width-request">400</property>
+    <style>
+      <class name="menu"/>
+    </style>
     <child>
       <object class="GtkBox">
         <property name="orientation">vertical</property>
-        <property name="spacing">6</property>
         <child>
-          <object class="GtkFrame">
+          <object class="GtkScrolledWindow" id="scroller">
+            <property name="propagate-natural-height">true</property>
+            <property name="propagate-natural-width">true</property>
+            <property name="min-content-height">100</property>
+            <property name="max-content-height">600</property>
+            <property name="min-content-width">400</property>
+            <property name="max-content-width">400</property>
+            <style>
+              <class name="bottom-shadow-when-scroll"/>
+            </style>
             <child>
-              <object class="GtkScrolledWindow" id="scroller">
-                <property name="propagate-natural-height">true</property>
-                <property name="propagate-natural-width">true</property>
-                <property name="min-content-height">100</property>
-                <property name="max-content-height">600</property>
-                <property name="min-content-width">400</property>
-                <property name="max-content-width">400</property>
-                <child>
-                  <object class="GtkListView" id="list_view">
-                    <signal name="activate" handler="gbp_symbol_popover_activate_cb" swapped="true" 
object="GbpSymbolPopover"/>
-                    <property name="orientation">vertical</property>
-                    <property name="single-click-activate">True</property>
-                    <property name="factory">
-                      <object class="GtkBuilderListItemFactory">
-                        <property name="resource">/plugins/symbol-tree/gbp-symbol-popover-row.ui</property>
-                      </object>
-                    </property>
+              <object class="GtkListView" id="list_view">
+                <signal name="activate" handler="gbp_symbol_popover_activate_cb" swapped="true" 
object="GbpSymbolPopover"/>
+                <property name="orientation">vertical</property>
+                <property name="single-click-activate">True</property>
+                <property name="factory">
+                  <object class="GtkBuilderListItemFactory">
+                    <property name="resource">/plugins/symbol-tree/gbp-symbol-popover-row.ui</property>
                   </object>
-                </child>
+                </property>
               </object>
             </child>
           </object>
@@ -37,6 +38,10 @@
             <property name="placeholder-text" translatable="yes">Filter Symbols…</property>
             <signal name="activate" handler="gbp_symbol_popover_search_activate_cb" swapped="true" 
object="GbpSymbolPopover"/>
             <signal name="search-changed" handler="gbp_symbol_popover_search_changed_cb" swapped="true" 
object="GbpSymbolPopover"/>
+            <property name="margin-top">6</property>
+            <property name="margin-bottom">6</property>
+            <property name="margin-start">6</property>
+            <property name="margin-end">6</property>
             <child>
               <object class="GtkEventControllerKey">
                 <property name="propagation-phase">capture</property>


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