[libhandy] preferences-page: Implement the margins via CSS



commit ca6a568412ceff2916152d31c12e1787ba1f7437
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Thu Dec 17 12:51:20 2020 +0100

    preferences-page: Implement the margins via CSS
    
    This makes the widget more flexible.

 src/hdy-preferences-page.ui        | 4 ----
 src/themes/Adwaita-dark.css        | 2 ++
 src/themes/Adwaita.css             | 2 ++
 src/themes/HighContrast.css        | 2 ++
 src/themes/HighContrastInverse.css | 2 ++
 src/themes/_fallback-base.scss     | 4 ++++
 src/themes/fallback.css            | 2 ++
 7 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/src/hdy-preferences-page.ui b/src/hdy-preferences-page.ui
index 0ebb97b4..d667b2ca 100644
--- a/src/hdy-preferences-page.ui
+++ b/src/hdy-preferences-page.ui
@@ -12,10 +12,6 @@
             <property name="visible">True</property>
             <child>
               <object class="HdyClamp">
-                <property name="margin-bottom">18</property>
-                <property name="margin-end">12</property>
-                <property name="margin-start">12</property>
-                <property name="margin-top">18</property>
                 <property name="visible">True</property>
                 <child>
                   <object class="GtkBox" id="box">
diff --git a/src/themes/Adwaita-dark.css b/src/themes/Adwaita-dark.css
index 01aed3f4..8221c7d0 100644
--- a/src/themes/Adwaita-dark.css
+++ b/src/themes/Adwaita-dark.css
@@ -83,6 +83,8 @@ statuspage > scrolledwindow > viewport > box > clamp > box > .title { margin-bot
 
 statuspage > scrolledwindow > viewport > box > clamp > box > .description { margin-bottom: 36px; }
 
+preferencespage > scrolledwindow > viewport > clamp { margin: 18px 12px; }
+
 preferencesgroup > box > label:not(:first-child) { margin-top: 6px; }
 
 preferencesgroup > box > box:not(:first-child) { margin-top: 12px; }
diff --git a/src/themes/Adwaita.css b/src/themes/Adwaita.css
index 18ac2871..a7ee27b9 100644
--- a/src/themes/Adwaita.css
+++ b/src/themes/Adwaita.css
@@ -83,6 +83,8 @@ statuspage > scrolledwindow > viewport > box > clamp > box > .title { margin-bot
 
 statuspage > scrolledwindow > viewport > box > clamp > box > .description { margin-bottom: 36px; }
 
+preferencespage > scrolledwindow > viewport > clamp { margin: 18px 12px; }
+
 preferencesgroup > box > label:not(:first-child) { margin-top: 6px; }
 
 preferencesgroup > box > box:not(:first-child) { margin-top: 12px; }
diff --git a/src/themes/HighContrast.css b/src/themes/HighContrast.css
index ca762c92..b68b3476 100644
--- a/src/themes/HighContrast.css
+++ b/src/themes/HighContrast.css
@@ -83,6 +83,8 @@ statuspage > scrolledwindow > viewport > box > clamp > box > .title { margin-bot
 
 statuspage > scrolledwindow > viewport > box > clamp > box > .description { margin-bottom: 36px; }
 
+preferencespage > scrolledwindow > viewport > clamp { margin: 18px 12px; }
+
 preferencesgroup > box > label:not(:first-child) { margin-top: 6px; }
 
 preferencesgroup > box > box:not(:first-child) { margin-top: 12px; }
diff --git a/src/themes/HighContrastInverse.css b/src/themes/HighContrastInverse.css
index 1468db73..2211c67e 100644
--- a/src/themes/HighContrastInverse.css
+++ b/src/themes/HighContrastInverse.css
@@ -83,6 +83,8 @@ statuspage > scrolledwindow > viewport > box > clamp > box > .title { margin-bot
 
 statuspage > scrolledwindow > viewport > box > clamp > box > .description { margin-bottom: 36px; }
 
+preferencespage > scrolledwindow > viewport > clamp { margin: 18px 12px; }
+
 preferencesgroup > box > label:not(:first-child) { margin-top: 6px; }
 
 preferencesgroup > box > box:not(:first-child) { margin-top: 12px; }
diff --git a/src/themes/_fallback-base.scss b/src/themes/_fallback-base.scss
index 26438e9e..7542710f 100644
--- a/src/themes/_fallback-base.scss
+++ b/src/themes/_fallback-base.scss
@@ -171,6 +171,10 @@ statuspage > scrolledwindow > viewport > box {
 
 // Preferences
 
+preferencespage > scrolledwindow > viewport > clamp {
+  margin: 18px 12px;
+}
+
 preferencesgroup > box {
   // Add space between the description and the title.
   > label:not(:first-child) {
diff --git a/src/themes/fallback.css b/src/themes/fallback.css
index a1c7d479..16afd3c4 100644
--- a/src/themes/fallback.css
+++ b/src/themes/fallback.css
@@ -83,6 +83,8 @@ statuspage > scrolledwindow > viewport > box > clamp > box > .title { margin-bot
 
 statuspage > scrolledwindow > viewport > box > clamp > box > .description { margin-bottom: 36px; }
 
+preferencespage > scrolledwindow > viewport > clamp { margin: 18px 12px; }
+
 preferencesgroup > box > label:not(:first-child) { margin-top: 6px; }
 
 preferencesgroup > box > box:not(:first-child) { margin-top: 12px; }


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