[gnome-games/wip/exalm/hidpi: 4/7] savestate-listbox-row: Specify thumbnail dimensions in XML



commit 9e4356f716608e48db599419ea2bd4138d6d3c86
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Fri Aug 16 22:53:46 2019 +0500

    savestate-listbox-row: Specify thumbnail dimensions in XML
    
    For some reason css min-width, min-height and margin don't work with
    GtkDrawingArea, so do it in XML to avoid it breaking in the next commit.
    
    Add 2px to the width and height to accommodate borders.

 data/gtk-style.css               | 3 ---
 data/ui/savestate-listbox-row.ui | 3 +++
 data/ui/savestates-list.ui       | 3 +++
 3 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/data/gtk-style.css b/data/gtk-style.css
index 602f05e4..b18bc580 100644
--- a/data/gtk-style.css
+++ b/data/gtk-style.css
@@ -13,12 +13,9 @@
 }
 
 .savestate-thumbnail {
-  min-width: 64px;
-  min-height: 64px;
   color: rgba(255, 255, 255, 0.5);
   background: rgba (0, 0, 0, .5);
   border: 1px solid rgba (0, 0, 0, .5);
-  margin: 6px;
   border-radius: 5px;
 }
 
diff --git a/data/ui/savestate-listbox-row.ui b/data/ui/savestate-listbox-row.ui
index 4da12bbc..306dc617 100644
--- a/data/ui/savestate-listbox-row.ui
+++ b/data/ui/savestate-listbox-row.ui
@@ -18,6 +18,9 @@
               <object class="GtkImage" id="image">
                 <property name="visible">true</property>
                 <property name="valign">start</property>
+                <property name="width-request">66</property>
+                <property name="height-request">66</property>
+                <property name="margin">6</property>
                 <style>
                   <class name="savestate-thumbnail"/>
                 </style>
diff --git a/data/ui/savestates-list.ui b/data/ui/savestates-list.ui
index 5921bef7..9be37865 100644
--- a/data/ui/savestates-list.ui
+++ b/data/ui/savestates-list.ui
@@ -43,6 +43,9 @@
                                 <property name="visible">True</property>
                                 <property name="icon-name">list-add-symbolic</property>
                                 <property name="pixel-size">32</property>
+                                <property name="width-request">66</property>
+                                <property name="height-request">66</property>
+                                <property name="margin">6</property>
                                 <style>
                                   <class name="savestate-thumbnail"/>
                                 </style>


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