[libadwaita/wip/exalm/screenshots-2: 22/23] doc: Simplify screenshot style classes




commit d479fc07ffc5d8de47a3f773e3e57a49640988dd
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Dec 20 20:43:35 2021 +0500

    doc: Simplify screenshot style classes
    
    .toolbar-sample was originally for toolbars specifically, but now we're
    using it everywhere. Rename it to docs-background as that's what it's
    really about.
    
    Remove .text-sample, add margin manually instead.

 doc/tools/data/bin.ui                      |   2 +-
 doc/tools/data/carousel-indicator-dots.ui  |   2 +-
 doc/tools/data/carousel-indicator-lines.ui |   2 +-
 doc/tools/data/carousel.ui                 |   2 +-
 doc/tools/data/dim-label.ui                |   6 +-
 doc/tools/data/preferences-group.ui        |   2 +-
 doc/tools/data/preferences-page.ui         |   2 +-
 doc/tools/data/status-page-compact.ui      |   2 +-
 doc/tools/data/status-page.ui              |   2 +-
 doc/tools/data/style-colors.ui             | 182 +++++++++++++++--------------
 doc/tools/data/toolbar-flat.ui             |   2 +-
 doc/tools/data/toolbar-spacer.ui           |   2 +-
 doc/tools/data/toolbar.ui                  |   2 +-
 doc/tools/data/typography-body.ui          |   6 +-
 doc/tools/data/typography-captions.ui      |   6 +-
 doc/tools/data/typography-heading.ui       |   6 +-
 doc/tools/data/typography-large-title.ui   |   6 +-
 doc/tools/data/typography-monospace.ui     |   6 +-
 doc/tools/data/typography-numeric.ui       |   6 +-
 doc/tools/data/typography-titles.ui        |   6 +-
 doc/tools/data/window-title.ui             |   2 +-
 doc/tools/style.css                        |   8 +-
 22 files changed, 148 insertions(+), 114 deletions(-)
---
diff --git a/doc/tools/data/bin.ui b/doc/tools/data/bin.ui
index 68ea76a6..6e6b866e 100644
--- a/doc/tools/data/bin.ui
+++ b/doc/tools/data/bin.ui
@@ -6,7 +6,7 @@
     <property name="width-request">150</property>
     <property name="height-request">150</property>
     <style>
-      <class name="toolbar-sample"/>
+      <class name="docs-background"/>
     </style>
   </object>
 </interface>
diff --git a/doc/tools/data/carousel-indicator-dots.ui b/doc/tools/data/carousel-indicator-dots.ui
index 6839dca9..b44713a0 100644
--- a/doc/tools/data/carousel-indicator-dots.ui
+++ b/doc/tools/data/carousel-indicator-dots.ui
@@ -38,7 +38,7 @@
               </object>
             </property>
             <style>
-              <class name="toolbar-sample"/>
+              <class name="docs-background"/>
             </style>
           </object>
         </child>
diff --git a/doc/tools/data/carousel-indicator-lines.ui b/doc/tools/data/carousel-indicator-lines.ui
index f383a7a5..dfe6fae0 100644
--- a/doc/tools/data/carousel-indicator-lines.ui
+++ b/doc/tools/data/carousel-indicator-lines.ui
@@ -38,7 +38,7 @@
               </object>
             </property>
             <style>
-              <class name="toolbar-sample"/>
+              <class name="docs-background"/>
             </style>
           </object>
         </child>
diff --git a/doc/tools/data/carousel.ui b/doc/tools/data/carousel.ui
index 55589a2a..5e01fd45 100644
--- a/doc/tools/data/carousel.ui
+++ b/doc/tools/data/carousel.ui
@@ -7,7 +7,7 @@
     <property name="width-request">400</property>
     <property name="spacing">12</property>
     <style>
-      <class name="toolbar-sample"/>
+      <class name="docs-background"/>
     </style>
     <child>
       <object class="GtkLabel">
diff --git a/doc/tools/data/dim-label.ui b/doc/tools/data/dim-label.ui
index bb481b9a..20235d00 100644
--- a/doc/tools/data/dim-label.ui
+++ b/doc/tools/data/dim-label.ui
@@ -4,13 +4,17 @@
   <requires lib="libadwaita" version="1.0"/>
   <object class="AdwBin" id="widget">
     <style>
-      <class name="text-sample"/>
+      <class name="docs-background"/>
     </style>
     <property name="child">
       <object class="GtkLabel">
         <property name="label">This is a dimmed paragraph, mostly used for secondary labels or 
descriptions.</property>
         <property name="wrap">True</property>
         <property name="max-width-chars">35</property>
+        <property name="margin-top">12</property>
+        <property name="margin-bottom">12</property>
+        <property name="margin-start">12</property>
+        <property name="margin-end">12</property>
         <style>
           <class name="dim-label"/>
         </style>
diff --git a/doc/tools/data/preferences-group.ui b/doc/tools/data/preferences-group.ui
index 977c4375..0272a997 100644
--- a/doc/tools/data/preferences-group.ui
+++ b/doc/tools/data/preferences-group.ui
@@ -31,7 +31,7 @@
       </object>
     </property>
     <style>
-      <class name="toolbar-sample"/>
+      <class name="docs-background"/>
     </style>
   </object>
 </interface>
diff --git a/doc/tools/data/preferences-page.ui b/doc/tools/data/preferences-page.ui
index 1bdc3f58..58697af4 100644
--- a/doc/tools/data/preferences-page.ui
+++ b/doc/tools/data/preferences-page.ui
@@ -6,7 +6,7 @@
   <object class="AdwPreferencesPage" id="widget">
     <property name="width-request">400</property>
     <style>
-      <class name="toolbar-sample"/>
+      <class name="docs-background"/>
     </style>
     <child>
       <object class="AdwPreferencesGroup">
diff --git a/doc/tools/data/status-page-compact.ui b/doc/tools/data/status-page-compact.ui
index 001124b1..1e102485 100644
--- a/doc/tools/data/status-page-compact.ui
+++ b/doc/tools/data/status-page-compact.ui
@@ -9,7 +9,7 @@
     <property name="width-request">250</property>
     <style>
       <class name="compact"/>
-      <class name="toolbar-sample"/>
+      <class name="docs-background"/>
     </style>
   </object>
 </interface>
diff --git a/doc/tools/data/status-page.ui b/doc/tools/data/status-page.ui
index ab3498fe..9942f096 100644
--- a/doc/tools/data/status-page.ui
+++ b/doc/tools/data/status-page.ui
@@ -8,7 +8,7 @@
     <property name="description">Try a different search</property>
     <property name="width-request">300</property>
     <style>
-      <class name="toolbar-sample"/>
+      <class name="docs-background"/>
     </style>
   </object>
 </interface>
diff --git a/doc/tools/data/style-colors.ui b/doc/tools/data/style-colors.ui
index 58dabf0b..d523ad44 100644
--- a/doc/tools/data/style-colors.ui
+++ b/doc/tools/data/style-colors.ui
@@ -2,107 +2,115 @@
 <interface>
   <requires lib="gtk" version="4.0"/>
   <requires lib="libadwaita" version="1.0"/>
-  <object class="GtkGrid" id="widget">
-    <property name="row-spacing">12</property>
-    <property name="column-spacing">12</property>
+  <object class="AdwBin" id="widget">
     <style>
-      <class name="text-sample"/>
+      <class name="docs-background"/>
     </style>
-    <child>
-      <object class="GtkBox">
-        <property name="spacing">6</property>
-        <style>
-          <class name="accent"/>
-        </style>
+    <property name="child">
+      <object class="GtkGrid">
+        <property name="row-spacing">12</property>
+        <property name="column-spacing">12</property>
+        <property name="margin-top">12</property>
+        <property name="margin-bottom">12</property>
+        <property name="margin-start">12</property>
+        <property name="margin-end">12</property>
         <child>
-          <object class="GtkImage">
-            <property name="icon-name">dialog-question-symbolic</property>
+          <object class="GtkBox">
+            <property name="spacing">6</property>
+            <style>
+              <class name="accent"/>
+            </style>
+            <child>
+              <object class="GtkImage">
+                <property name="icon-name">dialog-question-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="label">Accent</property>
+                <property name="margin-top">3</property>
+                <property name="margin-bottom">3</property>
+              </object>
+            </child>
+            <layout>
+              <property name="column">0</property>
+              <property name="row">0</property>
+            </layout>
           </object>
         </child>
         <child>
-          <object class="GtkLabel">
-            <property name="label">Accent</property>
-            <property name="margin-top">3</property>
-            <property name="margin-bottom">3</property>
+          <object class="GtkBox">
+            <property name="spacing">6</property>
+            <style>
+              <class name="success"/>
+            </style>
+            <child>
+              <object class="GtkImage">
+                <property name="icon-name">emblem-ok-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="label">Success</property>
+                <property name="margin-top">3</property>
+                <property name="margin-bottom">3</property>
+              </object>
+            </child>
+            <layout>
+              <property name="column">1</property>
+              <property name="row">0</property>
+            </layout>
           </object>
         </child>
-        <layout>
-          <property name="column">0</property>
-          <property name="row">0</property>
-        </layout>
-      </object>
-    </child>
-    <child>
-      <object class="GtkBox">
-        <property name="spacing">6</property>
-        <style>
-          <class name="success"/>
-        </style>
-        <child>
-          <object class="GtkImage">
-            <property name="icon-name">emblem-ok-symbolic</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkLabel">
-            <property name="label">Success</property>
-            <property name="margin-top">3</property>
-            <property name="margin-bottom">3</property>
-          </object>
-        </child>
-        <layout>
-          <property name="column">1</property>
-          <property name="row">0</property>
-        </layout>
-      </object>
-    </child>
-    <child>
-      <object class="GtkBox">
-        <property name="spacing">6</property>
-        <style>
-          <class name="warning"/>
-        </style>
-        <child>
-          <object class="GtkImage">
-            <property name="icon-name">dialog-warning-symbolic</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkLabel">
-            <property name="label">Warning</property>
-            <property name="margin-top">3</property>
-            <property name="margin-bottom">3</property>
-          </object>
-        </child>
-        <layout>
-          <property name="column">0</property>
-          <property name="row">1</property>
-        </layout>
-      </object>
-    </child>
-    <child>
-      <object class="GtkBox">
-        <property name="spacing">6</property>
-        <style>
-          <class name="error"/>
-        </style>
         <child>
-          <object class="GtkImage">
-            <property name="icon-name">dialog-error-symbolic</property>
+          <object class="GtkBox">
+            <property name="spacing">6</property>
+            <style>
+              <class name="warning"/>
+            </style>
+            <child>
+              <object class="GtkImage">
+                <property name="icon-name">dialog-warning-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="label">Warning</property>
+                <property name="margin-top">3</property>
+                <property name="margin-bottom">3</property>
+              </object>
+            </child>
+            <layout>
+              <property name="column">0</property>
+              <property name="row">1</property>
+            </layout>
           </object>
         </child>
         <child>
-          <object class="GtkLabel">
-            <property name="label">Error</property>
-            <property name="margin-top">3</property>
-            <property name="margin-bottom">3</property>
+          <object class="GtkBox">
+            <property name="spacing">6</property>
+            <style>
+              <class name="error"/>
+            </style>
+            <child>
+              <object class="GtkImage">
+                <property name="icon-name">dialog-error-symbolic</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="label">Error</property>
+                <property name="margin-top">3</property>
+                <property name="margin-bottom">3</property>
+              </object>
+            </child>
+            <layout>
+              <property name="column">1</property>
+              <property name="row">1</property>
+            </layout>
           </object>
         </child>
-        <layout>
-          <property name="column">1</property>
-          <property name="row">1</property>
-        </layout>
       </object>
-    </child>
+    </property>
   </object>
 </interface>
diff --git a/doc/tools/data/toolbar-flat.ui b/doc/tools/data/toolbar-flat.ui
index 2c607a6a..71fb98d4 100644
--- a/doc/tools/data/toolbar-flat.ui
+++ b/doc/tools/data/toolbar-flat.ui
@@ -5,7 +5,7 @@
   <menu id="demo_menu"/>
   <object class="AdwBin" id="widget">
     <style>
-      <class name="toolbar-sample"/>
+      <class name="docs-background"/>
     </style>
     <property name="child">
       <object class="GtkBox">
diff --git a/doc/tools/data/toolbar-spacer.ui b/doc/tools/data/toolbar-spacer.ui
index 01b5285a..c5892faf 100644
--- a/doc/tools/data/toolbar-spacer.ui
+++ b/doc/tools/data/toolbar-spacer.ui
@@ -5,7 +5,7 @@
   <menu id="demo_menu"/>
   <object class="AdwBin" id="widget">
     <style>
-      <class name="toolbar-sample"/>
+      <class name="docs-background"/>
     </style>
     <property name="child">
       <object class="GtkBox">
diff --git a/doc/tools/data/toolbar.ui b/doc/tools/data/toolbar.ui
index 76e64965..9ac3af10 100644
--- a/doc/tools/data/toolbar.ui
+++ b/doc/tools/data/toolbar.ui
@@ -5,7 +5,7 @@
   <menu id="demo_menu"/>
   <object class="AdwBin" id="widget">
     <style>
-      <class name="toolbar-sample"/>
+      <class name="docs-background"/>
     </style>
     <property name="child">
       <object class="GtkBox">
diff --git a/doc/tools/data/typography-body.ui b/doc/tools/data/typography-body.ui
index 5c3298f4..affcad33 100644
--- a/doc/tools/data/typography-body.ui
+++ b/doc/tools/data/typography-body.ui
@@ -4,7 +4,7 @@
   <requires lib="libadwaita" version="1.0"/>
   <object class="AdwBin" id="widget">
     <style>
-      <class name="text-sample"/>
+      <class name="docs-background"/>
     </style>
     <property name="child">
       <object class="GtkLabel">
@@ -12,6 +12,10 @@
         <property name="use-markup">True</property>
         <property name="wrap">True</property>
         <property name="max-width-chars">35</property>
+        <property name="margin-top">12</property>
+        <property name="margin-bottom">12</property>
+        <property name="margin-start">12</property>
+        <property name="margin-end">12</property>
         <style>
           <class name="body"/>
         </style>
diff --git a/doc/tools/data/typography-captions.ui b/doc/tools/data/typography-captions.ui
index 505324d9..7264db91 100644
--- a/doc/tools/data/typography-captions.ui
+++ b/doc/tools/data/typography-captions.ui
@@ -4,12 +4,16 @@
   <requires lib="libadwaita" version="1.0"/>
   <object class="AdwBin" id="widget">
     <style>
-      <class name="text-sample"/>
+      <class name="docs-background"/>
     </style>
     <property name="child">
       <object class="GtkBox">
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <property name="margin-top">12</property>
+        <property name="margin-bottom">12</property>
+        <property name="margin-start">12</property>
+        <property name="margin-end">12</property>
         <child>
           <object class="GtkLabel">
             <property name="label">Caption Heading</property>
diff --git a/doc/tools/data/typography-heading.ui b/doc/tools/data/typography-heading.ui
index c72c4f43..8c2d671c 100644
--- a/doc/tools/data/typography-heading.ui
+++ b/doc/tools/data/typography-heading.ui
@@ -4,11 +4,15 @@
   <requires lib="libadwaita" version="1.0"/>
   <object class="AdwBin" id="widget">
     <style>
-      <class name="text-sample"/>
+      <class name="docs-background"/>
     </style>
     <property name="child">
       <object class="GtkLabel">
         <property name="label">Heading</property>
+        <property name="margin-top">12</property>
+        <property name="margin-bottom">12</property>
+        <property name="margin-start">12</property>
+        <property name="margin-end">12</property>
         <style>
           <class name="heading"/>
         </style>
diff --git a/doc/tools/data/typography-large-title.ui b/doc/tools/data/typography-large-title.ui
index d38519c5..92796fa3 100644
--- a/doc/tools/data/typography-large-title.ui
+++ b/doc/tools/data/typography-large-title.ui
@@ -4,11 +4,15 @@
   <requires lib="libadwaita" version="1.0"/>
   <object class="AdwBin" id="widget">
     <style>
-      <class name="text-sample"/>
+      <class name="docs-background"/>
     </style>
     <property name="child">
       <object class="GtkLabel">
         <property name="label">Large Title</property>
+        <property name="margin-top">12</property>
+        <property name="margin-bottom">12</property>
+        <property name="margin-start">12</property>
+        <property name="margin-end">12</property>
         <style>
           <class name="large-title"/>
         </style>
diff --git a/doc/tools/data/typography-monospace.ui b/doc/tools/data/typography-monospace.ui
index e053bda2..bcc1ab7d 100644
--- a/doc/tools/data/typography-monospace.ui
+++ b/doc/tools/data/typography-monospace.ui
@@ -4,11 +4,15 @@
   <requires lib="libadwaita" version="1.0"/>
   <object class="AdwBin" id="widget">
     <style>
-      <class name="text-sample"/>
+      <class name="docs-background"/>
     </style>
     <property name="child">
       <object class="GtkLabel">
         <property name="label">Monospace</property>
+        <property name="margin-top">12</property>
+        <property name="margin-bottom">12</property>
+        <property name="margin-start">12</property>
+        <property name="margin-end">12</property>
         <style>
           <class name="monospace"/>
         </style>
diff --git a/doc/tools/data/typography-numeric.ui b/doc/tools/data/typography-numeric.ui
index a7f3d60c..ca5c7f98 100644
--- a/doc/tools/data/typography-numeric.ui
+++ b/doc/tools/data/typography-numeric.ui
@@ -4,12 +4,16 @@
   <requires lib="libadwaita" version="1.0"/>
   <object class="AdwBin" id="widget">
     <style>
-      <class name="text-sample"/>
+      <class name="docs-background"/>
     </style>
     <property name="child">
       <object class="GtkBox">
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <property name="margin-top">12</property>
+        <property name="margin-bottom">12</property>
+        <property name="margin-start">12</property>
+        <property name="margin-end">12</property>
         <child>
           <object class="GtkLabel">
             <property name="label">Regular (0123456789)</property>
diff --git a/doc/tools/data/typography-titles.ui b/doc/tools/data/typography-titles.ui
index 86ff7da3..ff59f8e1 100644
--- a/doc/tools/data/typography-titles.ui
+++ b/doc/tools/data/typography-titles.ui
@@ -4,12 +4,16 @@
   <requires lib="libadwaita" version="1.0"/>
   <object class="AdwBin" id="widget">
     <style>
-      <class name="text-sample"/>
+      <class name="docs-background"/>
     </style>
     <property name="child">
       <object class="GtkBox">
         <property name="orientation">vertical</property>
         <property name="spacing">12</property>
+        <property name="margin-top">12</property>
+        <property name="margin-bottom">12</property>
+        <property name="margin-start">12</property>
+        <property name="margin-end">12</property>
         <child>
           <object class="GtkLabel">
             <property name="label">Title 1</property>
diff --git a/doc/tools/data/window-title.ui b/doc/tools/data/window-title.ui
index 25cfb3d4..08aa1d5a 100644
--- a/doc/tools/data/window-title.ui
+++ b/doc/tools/data/window-title.ui
@@ -14,7 +14,7 @@
       </object>
     </property>
     <style>
-      <class name="toolbar-sample"/>
+      <class name="docs-background"/>
     </style>
   </object>
 </interface>
diff --git a/doc/tools/style.css b/doc/tools/style.css
index 1b0da73c..2cab3c82 100644
--- a/doc/tools/style.css
+++ b/doc/tools/style.css
@@ -1,14 +1,8 @@
-.toolbar-sample {
+.docs-background {
   background: alpha(currentColor, .05);
   border-radius: 12px;
 }
 
-.text-sample {
-  background: alpha(currentColor, .05);
-  padding: 12px;
-  border-radius: 12px;
-}
-
 #opaque-button-1 {
   color: @success_fg_color;
   background-color: @success_bg_color;


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