widget-factory: Make frames cooler
authorBenjamin Otte <otte@redhat.com>
Fri, 30 Jul 2021 18:41:30 +0000 (20:41 +0200)
committerBenjamin Otte <otte@redhat.com>
Fri, 30 Jul 2021 18:43:02 +0000 (20:43 +0200)
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

index a5883ec31df03da5b9889101191c0c53c26c0d1d..05001b0ef3df091208353a62a80b33cec1a192b1 100644 (file)
@@ -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>