[polari] urlPreview: Move margin into CSS



commit 020d7fd423ef0616c603069a3e29160beb59cbd2
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Jul 18 16:12:25 2020 +0200

    urlPreview: Move margin into CSS
    
    Setting it in code for some reason confuses size negotiations, resulting
    in warnings about negative size requests. It looks like CSS margins
    don't suffer from the same problem, so just use those instead.
    
    https://gitlab.gnome.org/GNOME/polari/-/issues/142

 data/resources/application.css | 3 +++
 src/urlPreview.js              | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/data/resources/application.css b/data/resources/application.css
index a0a57a76..e455304f 100644
--- a/data/resources/application.css
+++ b/data/resources/application.css
@@ -118,6 +118,9 @@ treeview.polari-server-room-list {
 }
 
 .url-preview { padding: 8px; }
+.url-preview { margin: 12px; }
+.url-preview:dir(ltr) { margin-left: 0; }
+.url-preview:dir(rtl) { margin-right: 0; }
 .url-preview image { min-width: 120px; min-height: 90px; }
 .url-preview label { font-size: small; }
 
diff --git a/src/urlPreview.js b/src/urlPreview.js
index e388b78b..b818c812 100644
--- a/src/urlPreview.js
+++ b/src/urlPreview.js
@@ -78,8 +78,6 @@ var URLPreview = GObject.registerClass({
 
         this.set({
             orientation: Gtk.Orientation.VERTICAL,
-            margin: 12,
-            margin_start: 0,
             spacing: 6,
         });
 


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