[gnome-maps] placeEntry: Set minimum width to 320 px



commit 6d051ed4c6a787ef73554218d9fe33fc73d457d7
Author: Marcus Lundblad <ml update uu se>
Date:   Thu Jan 30 22:04:22 2020 +0100

    placeEntry: Set minimum width to 320 px
    
    To avoid all too narrow popovers in the route
    search entries in the sidebar.
    
    Refs #236

 src/placeEntry.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/placeEntry.js b/src/placeEntry.js
index 88cb1faf..1e22e39f 100644
--- a/src/placeEntry.js
+++ b/src/placeEntry.js
@@ -170,7 +170,8 @@ var PlaceEntry = GObject.registerClass({
         this.connect('size-allocate', (widget, allocation) => {
             // Magic number to make the alignment pixel perfect.
             let width_request = allocation.width + 20;
-            popover.width_request = width_request;
+            // set at least 320 px width to avoid too narrow in the sidebar
+            popover.width_request = Math.max(width_request, 320);
         });
 
         popover.connect('selected', (widget, place) => {


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