[gtk/wip/otte/for-master: 2/2] widget-factory: Make frames cooler




commit c06817b9512483ac71872076f583ac2d062d17c2
Author: Benjamin Otte <otte redhat com>
Date:   Fri Jul 30 20:41:30 2021 +0200

    widget-factory: Make frames cooler
    
    Instead of havoing a label for the video frame that clashes with the
    background of the video, add a frame around the text styles box and add
    a label for them. As a side benefit, it also makes it more obvious that
    it is scrollable.
    
    Note: Most of this patch is just reindenting.

 demos/widget-factory/widget-factory.ui | 135 +++++++++++++++++----------------
 1 file changed, 69 insertions(+), 66 deletions(-)
---
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index a5883ec31d..05001b0ef3 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -1051,14 +1051,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                             <property name="spacing">10</property>
                             <property name="hexpand">1</property>
                             <child>
-                              <object class="GtkFrame" id="frame1">
-                                <property name="valign">start</property>
-                                <child type="label">
-                                  <object class="GtkLabel" id="label1">
-                                    <property name="label" 
translatable="yes">&lt;b&gt;Video&lt;/b&gt;</property>
-                                    <property name="use-markup">1</property>
-                                  </object>
-                                </child>
+                              <object class="GtkFrame">
                                 <child>
                                   <object class="GtkVideo">
                                     <property name="autoplay">1</property>
@@ -1069,66 +1062,76 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                               </object>
                             </child>
                             <child>
-                              <object class="GtkScrolledWindow">
-                                <property name="vexpand">1</property>
-                                <property name="hscrollbar-policy">never</property>
-                                <property name="vscrollbar-policy">automatic</property>
+                              <object class="GtkFrame">
+                                <child type="label">
+                                  <object class="GtkLabel" id="label1">
+                                    <property name="label" translatable="yes">&lt;b&gt;Text 
Styles&lt;/b&gt;</property>
+                                    <property name="use-markup">1</property>
+                                  </object>
+                                </child>
                                 <child>
-                                  <object class="GtkBox">
-                                    <property name="orientation">vertical</property>
-                                    <property name="spacing">10</property>
-                                    <child>
-                                      <object class="GtkLabel">
-                                        <property name="label">Large Title</property>
-                                        <style><class name="large-title"/></style>
-                                      </object>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLabel">
-                                        <property name="label">Title 1</property>
-                                        <style><class name="title-1"/></style>
-                                      </object>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLabel">
-                                        <property name="label">Title 2</property>
-                                        <style><class name="title-2"/></style>
-                                      </object>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLabel">
-                                        <property name="label">Title 3</property>
-                                        <style><class name="title-3"/></style>
-                                      </object>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLabel">
-                                        <property name="label">Title 4</property>
-                                        <style><class name="title-4"/></style>
-                                      </object>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLabel">
-                                        <property name="label">Heading</property>
-                                        <style><class name="heading"/></style>
-                                      </object>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLabel">
-                                        <property name="label">Body</property>
-                                        <style><class name="body"/></style>
-                                      </object>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLabel">
-                                        <property name="label">Caption Heading</property>
-                                        <style><class name="caption-heading"/></style>
-                                      </object>
-                                    </child>
+                                  <object class="GtkScrolledWindow">
+                                    <property name="vexpand">1</property>
+                                    <property name="hscrollbar-policy">never</property>
+                                    <property name="vscrollbar-policy">automatic</property>
                                     <child>
-                                      <object class="GtkLabel">
-                                        <property name="label">Caption</property>
-                                        <style><class name="caption"/></style>
+                                      <object class="GtkBox">
+                                        <property name="orientation">vertical</property>
+                                        <property name="spacing">10</property>
+                                        <child>
+                                          <object class="GtkLabel">
+                                            <property name="label">Large Title</property>
+                                            <style><class name="large-title"/></style>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel">
+                                            <property name="label">Title 1</property>
+                                            <style><class name="title-1"/></style>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel">
+                                            <property name="label">Title 2</property>
+                                            <style><class name="title-2"/></style>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel">
+                                            <property name="label">Title 3</property>
+                                            <style><class name="title-3"/></style>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel">
+                                            <property name="label">Title 4</property>
+                                            <style><class name="title-4"/></style>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel">
+                                            <property name="label">Heading</property>
+                                            <style><class name="heading"/></style>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel">
+                                            <property name="label">Body</property>
+                                            <style><class name="body"/></style>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel">
+                                            <property name="label">Caption Heading</property>
+                                            <style><class name="caption-heading"/></style>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel">
+                                            <property name="label">Caption</property>
+                                            <style><class name="caption"/></style>
+                                          </object>
+                                        </child>
                                       </object>
                                     </child>
                                   </object>


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