[gtk/matthiasc/for-master: 15/15] dropdown: Style fixups
- From: Matthias Clasen <matthiasc src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk/matthiasc/for-master: 15/15] dropdown: Style fixups
 
- Date: Mon, 15 Jun 2020 14:26:22 +0000 (UTC)
 
commit cf2d6f6ec523c0ae73d5021f19e66871ee17d207
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jun 15 10:23:39 2020 -0400
    dropdown: Style fixups
    
    Make the dropdown popover have a .menu style class,
    and add padding to the rows in the popover. Also,
    make the popover left-aligned with the button.
 gtk/theme/Adwaita/_common.scss | 4 ++++
 gtk/ui/gtkdropdown.ui          | 4 ++++
 2 files changed, 8 insertions(+)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index d2ed052b06..dca44ed351 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -1173,6 +1173,10 @@ combobox {
   }
 }
 
+dropdown > popover listview > row {
+  padding: 6px;
+}
+
 // the combo is a composite widget so the way we do button linking doesn't
 // work, special case needed. See
 // https://bugzilla.gnome.org/show_bug.cgi?id=733979
diff --git a/gtk/ui/gtkdropdown.ui b/gtk/ui/gtkdropdown.ui
index fdd84ddaf2..5623663553 100644
--- a/gtk/ui/gtkdropdown.ui
+++ b/gtk/ui/gtkdropdown.ui
@@ -45,8 +45,12 @@
     <child>
   <object class="GtkPopover" id="popup">
     <signal name="closed" handler="popover_closed"/>
+    <property name="halign">start</property>
     <property name="has-arrow">0</property>
     <property name="autohide">1</property>
+    <style>
+     <class name="menu"/>
+    </style>
     <child>
       <object class="GtkBox">
         <property name="orientation">vertical</property>
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]