[gnome-clocks/bilelmoussaoui/empty-views: 2/2] Make the empty views consistent



commit 07077aec486bf6607dcc5b4f4f70615df401a835
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date:   Sat Jul 11 19:40:19 2020 +0200

    Make the empty views consistent
    
    world: add a button/larger image
    alarm: larger button
    stopwatch: center if empty
    
    Fixes #121

 data/css/gnome-clocks.css                  |   9 +-
 data/gnome-clocks.gresource.xml            |   4 +
 data/gtk/icons/alarm-centered-symbolic.svg | 112 +++++++++
 data/gtk/icons/globe-centered-symbolic.svg | 114 +++++++++
 data/ui/alarm-face.ui                      |   8 +-
 data/ui/stopwatch-face.ui                  | 375 ++++++++++++++---------------
 data/ui/world-face.ui                      |  32 +--
 src/stopwatch-face.vala                    |  13 +
 8 files changed, 454 insertions(+), 213 deletions(-)
---
diff --git a/data/css/gnome-clocks.css b/data/css/gnome-clocks.css
index d650fe1..f38ef4d 100644
--- a/data/css/gnome-clocks.css
+++ b/data/css/gnome-clocks.css
@@ -18,6 +18,10 @@ label.destructive-action {
        margin: 18px 6px;
 }
 
+.large-button {
+       padding: 6px 32px;
+}
+
 .pill-button {
        border-radius: 9999px;
        -gtk-outline-radius: 9999px;
@@ -138,11 +142,6 @@ spinbutton.clocks-timer-label button {
 }
 
 /* Stopwatch Panel */
-
-.stopwatch-panel .large-button {
-       padding: 6px 32px;
-}
-
 .lap-time {
        font-weight: bold;
 }
diff --git a/data/gnome-clocks.gresource.xml b/data/gnome-clocks.gresource.xml
index 1538975..ad2406b 100644
--- a/data/gnome-clocks.gresource.xml
+++ b/data/gnome-clocks.gresource.xml
@@ -23,6 +23,10 @@
     <file preprocess="xml-stripblanks">ui/world-standalone.ui</file>
   </gresource>
   <gresource prefix="/org/gnome/clocks/icons">
+    <!-- The symbolic icons correctly centered, used in empty views -->
+    <file alias="alarm-centered-symbolic.svg">gtk/icons/alarm-centered-symbolic.svg</file>
+    <file alias="globe-centered-symbolic.svg">gtk/icons/globe-centered-symbolic.svg</file>
+
     <file alias="globe-symbolic.svg">gtk/icons/globe-symbolic.svg</file>
     <file alias="stopwatch-symbolic.svg">gtk/icons/stopwatch-symbolic.svg</file>
     <file alias="timer-symbolic.svg">gtk/icons/timer-symbolic.svg</file>
diff --git a/data/gtk/icons/alarm-centered-symbolic.svg b/data/gtk/icons/alarm-centered-symbolic.svg
new file mode 100644
index 0000000..c154fde
--- /dev/null
+++ b/data/gtk/icons/alarm-centered-symbolic.svg
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:osb="http://www.openswatchbook.org/uri/2009/osb";
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
+   sodipodi:docname="alarm-centered-symbolic.svg"
+   height="16.01058"
+   id="svg7384"
+   version="1.1"
+   viewBox="0 0 16 16.01058"
+   width="16">
+  <sodipodi:namedview
+     inkscape:current-layer="svg7384"
+     inkscape:window-maximized="1"
+     inkscape:window-y="0"
+     inkscape:window-x="0"
+     inkscape:cy="14.301444"
+     inkscape:cx="6.9269414"
+     inkscape:zoom="22.110379"
+     showgrid="true"
+     id="namedview19"
+     inkscape:window-height="1016"
+     inkscape:window-width="1920"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0"
+     guidetolerance="10"
+     gridtolerance="10"
+     objecttolerance="10"
+     borderopacity="1"
+     bordercolor="#666666"
+     pagecolor="#ffffff">
+    <inkscape:grid
+       id="grid844"
+       type="xygrid" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata90">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:title>Gnome Symbolic Icon Theme</dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <title
+     id="title9167">Gnome Symbolic Icon Theme</title>
+  <defs
+     id="defs7386">
+    <linearGradient
+       id="linearGradient7212"
+       osb:paint="solid">
+      <stop
+         id="stop7214"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+    </linearGradient>
+  </defs>
+  <g
+     id="layer9"
+     style="display:inline"
+     transform="translate(-801.0002,227)" />
+  <g
+     id="g7628"
+     style="display:inline"
+     transform="translate(-800.49219,227)">
+    <path
+       
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;
 
stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       d="M 808.49219,-221.00781 A 0.50005,0.50005 0 0 0 808,-220.5 v 2.5 h -1.5 a 0.50005,0.50005 0 1 0 0,1 
h 2 a 0.50005,0.50005 0 0 0 0.5,-0.5 v -3 a 0.50005,0.50005 0 0 0 -0.50781,-0.50781 z"
+       id="path59045" />
+    <path
+       
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.
 
98256;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       d="m 808.48828,-223.93555 c -3.56009,0 -6.46679,2.90866 -6.4668,6.46875 10e-6,3.5601 2.90671,6.4668 
6.4668,6.4668 3.56009,0 6.4668,-2.9067 6.4668,-6.4668 0,-3.56009 -2.90671,-6.46875 -6.4668,-6.46875 z m 
0,1.98243 c 2.48864,0 4.48438,1.99768 4.48438,4.48632 0,2.48864 -1.99574,4.48438 -4.48438,4.48438 -2.48864,0 
-4.48437,-1.99574 -4.48437,-4.48438 0,-2.48864 1.99573,-4.48632 4.48437,-4.48632 z"
+       id="path59049" />
+    <path
+       
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:2;marker:none;enable-background:accumulate"
+       id="path59561"
+       d="m 805.28145,-226 c -1.80618,0 -3.28125,1.47507 -3.28125,3.28125 0,0.40491 0.0842,0.76711 
0.21875,1.125 1.20599,-1.82226 3.18396,-3.10226 5.46875,-3.34375 -0.59771,-0.64999 -1.4536,-1.0625 
-2.40625,-1.0625 z m 6.4375,0 c -0.95265,0 -1.80854,0.41251 -2.40625,1.0625 2.28729,0.25122 4.27051,1.54101 
5.46875,3.375 0.14145,-0.3658 0.21875,-0.74054 0.21875,-1.15625 0,-1.80618 -1.47508,-3.28125 
-3.28125,-3.28125 z" />
+    <path
+       
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;
 
stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       d="m 805.11914,-214.10352 a 1.0001,1.0001 0 0 0 -0.69141,0.29297 l -1.125,1.09375 a 1.0001,1.0001 0 1 
0 1.39454,1.4336 l 1.125,-1.09375 a 1.0001,1.0001 0 0 0 -0.70313,-1.72657 z"
+       id="path59570" />
+    <path
+       
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;
 
stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       d="m 812.0332,-214.00977 a 1.0001,1.0001 0 0 0 -0.67968,1.68165 l 0.90625,1 a 1.0001,1.0001 0 1 0 
1.48046,-1.34376 l -0.90625,-1 a 1.0001,1.0001 0 0 0 -0.80078,-0.33789 z"
+       id="path59572" />
+  </g>
+  <g
+     id="layer1"
+     style="display:inline"
+     transform="translate(-560,-140)" />
+  <g
+     id="layer10"
+     style="display:inline"
+     transform="translate(-560,-140)" />
+  <g
+     id="g6387"
+     style="display:inline"
+     transform="translate(-560,-140)" />
+  <g
+     id="layer11"
+     style="display:inline"
+     transform="translate(-560,-140)" />
+</svg>
diff --git a/data/gtk/icons/globe-centered-symbolic.svg b/data/gtk/icons/globe-centered-symbolic.svg
new file mode 100644
index 0000000..c0bd12d
--- /dev/null
+++ b/data/gtk/icons/globe-centered-symbolic.svg
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:osb="http://www.openswatchbook.org/uri/2009/osb";
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
+   sodipodi:docname="globe-centered-symbolic.svg"
+   height="16.004578"
+   id="svg7384"
+   version="1.1"
+   viewBox="0 0 16 16.004578"
+   width="16">
+  <sodipodi:namedview
+     inkscape:current-layer="svg7384"
+     inkscape:window-maximized="1"
+     inkscape:window-y="0"
+     inkscape:window-x="0"
+     inkscape:cy="11.234539"
+     inkscape:cx="10.04129"
+     inkscape:zoom="22.118672"
+     showgrid="true"
+     id="namedview20"
+     inkscape:window-height="1016"
+     inkscape:window-width="1920"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0"
+     guidetolerance="10"
+     gridtolerance="10"
+     objecttolerance="10"
+     borderopacity="1"
+     bordercolor="#666666"
+     pagecolor="#ffffff">
+    <inkscape:grid
+       id="grid847"
+       type="xygrid" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata90">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:title>Gnome Symbolic Icon Theme</dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <title
+     id="title9167">Gnome Symbolic Icon Theme</title>
+  <defs
+     id="defs7386">
+    <linearGradient
+       id="linearGradient7212"
+       osb:paint="solid">
+      <stop
+         id="stop7214"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+    </linearGradient>
+  </defs>
+  <g
+     id="layer1"
+     style="display:inline"
+     transform="translate(-519.98255,160)" />
+  <g
+     id="layer9"
+     style="display:inline"
+     transform="translate(-760.98275,527)" />
+  <g
+     id="g7628"
+     style="display:inline"
+     transform="translate(-760.5002,528)">
+    <path
+       d="m 762.0002,-520 v 1 h 13 v -1 z"
+       id="path832"
+       
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.5;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:
 
1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
 />
+    <path
+       d="m 762.0002,-523 v 1 h 13 v -1 z"
+       id="path834"
+       
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.5;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:
 
1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
 />
+    <path
+       d="m 762.0002,-517 v 1 h 13 v -1 z"
+       id="path836"
+       
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.5;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:
 
1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
 />
+    <path
+       d="m 768.5002,-527 c -4.13029,0 -7.5,3.36971 -7.5,7.5 0,4.13029 3.36971,7.5 7.5,7.5 4.13029,0 
7.5,-3.36971 7.5,-7.5 0,-4.13029 -3.36971,-7.5 -7.5,-7.5 z m 0,2 c 0.25596,0 0.50553,0.0232 0.75195,0.0566 
0.19059,0.26016 0.38153,0.59041 0.54883,1.02539 0.42182,1.09678 0.69922,2.67505 0.69922,4.41801 0,1.74296 
-0.2774,3.31928 -0.69922,4.41602 -0.16776,0.43617 -0.35967,0.767 -0.55078,1.02734 -0.24581,0.0333 
-0.49471,0.0566 -0.75,0.0566 -0.25529,0 -0.50419,-0.0234 -0.75,-0.0566 -0.19111,-0.26034 -0.38302,-0.59117 
-0.55078,-1.02734 -0.42182,-1.09674 -0.69922,-2.67306 -0.69922,-4.41602 0,-1.74296 0.2774,-3.32123 
0.69922,-4.41797 0.1673,-0.43498 0.35824,-0.76523 0.54883,-1.02539 0.24642,-0.0334 0.49599,-0.0566 
0.75195,-0.0566 z m -2.08789,0.4082 c -0.0474,0.10764 -0.10239,0.1998 -0.14649,0.31446 -0.483,1.2558 
-0.76562,2.93045 -0.76562,4.77734 0,1.84689 0.28262,3.51959 0.76562,4.77539 0.0443,0.11525 0.0988,0.20826 
0.14649,0.31641 -2.00637,-0.81832 -3.41211,-2.78264 -3.41211,-5.0918 0,-2
 .30916 1.40574,-4.27348 3.41211,-5.0918 z m 4.17578,0 c 2.00637,0.81832 3.41211,2.78264 3.41211,5.0918 
0,2.30916 -1.40574,4.27348 -3.41211,5.0918 0.0477,-0.10815 0.10216,-0.20116 0.14649,-0.31641 0.483,-1.2558 
0.76562,-2.9285 0.76562,-4.77539 0,-1.84689 -0.28263,-3.52154 -0.76562,-4.77734 -0.0441,-0.11466 
-0.0991,-0.20682 -0.14649,-0.31446 z"
+       id="path838"
+       
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;
 
stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
 />
+  </g>
+  <g
+     id="layer13"
+     transform="translate(-519.98255,-40)" />
+  <g
+     id="g6387"
+     style="display:inline"
+     transform="translate(-519.98255,160)" />
+  <g
+     id="layer10"
+     style="display:inline"
+     transform="translate(-519.98255,160)" />
+  <g
+     id="layer12"
+     transform="translate(-519.98255,160)" />
+  <g
+     id="layer11"
+     style="display:inline"
+     transform="translate(-519.98255,160)" />
+</svg>
diff --git a/data/ui/alarm-face.ui b/data/ui/alarm-face.ui
index d873469..685c97e 100644
--- a/data/ui/alarm-face.ui
+++ b/data/ui/alarm-face.ui
@@ -10,12 +10,12 @@
         <property name="visible">True</property>
         <property name="halign">center</property>
         <property name="valign">center</property>
-        <property name="spacing">24</property>
+        <property name="spacing">36</property>
         <property name="orientation">vertical</property>
         <child>
-          <object class="GtkImage" id="image1">
+          <object class="GtkImage">
             <property name="visible">True</property>
-            <property name="icon_name">alarm-symbolic</property>
+            <property name="icon_name">alarm-centered-symbolic</property>
             <property name="pixel-size">128</property>
             <style>
               <class name="dim-label"/>
@@ -31,6 +31,8 @@
             <property name="halign">center</property>
             <style>
               <class name="suggested-action"/>
+              <class name="large-button"/>
+              <class name="pill-button"/>
             </style>
           </object>
         </child>
diff --git a/data/ui/stopwatch-face.ui b/data/ui/stopwatch-face.ui
index 330f7c3..15c2bb2 100644
--- a/data/ui/stopwatch-face.ui
+++ b/data/ui/stopwatch-face.ui
@@ -13,151 +13,34 @@
         <property name="can_focus">True</property>
         <property name="min_content_width">300</property>
         <child>
-          <object class="GtkViewport">
+          <object class="HdyClamp">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="shadow_type">none</property>
+            <property name="maximum_size">380</property>
             <child>
-              <object class="HdyClamp">
+              <object class="GtkBox" id="container">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="maximum_size">380</property>
+                <property name="valign">center</property>
+                <property name="orientation">vertical</property>
                 <child>
-                  <object class="GtkBox">
+                  <object class="GtkBox" id="time_container">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="margin_top">36</property>
-                    <property name="orientation">vertical</property>
+                    <property name="halign">center</property>
+                    <property name="margin_bottom">18</property>
                     <child>
-                      <object class="GtkBox" id="time_container">
+                      <object class="GtkLabel" id="hours_label">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="halign">center</property>
-                        <property name="margin_bottom">18</property>
-                        <child>
-                          <object class="GtkLabel" id="hours_label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label">00</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
-                            <attributes>
-                              <attribute name="font-features" value="tnum=1"/>
-                            </attributes>
-                            <style>
-                              <class name="hours-label"/>
-                            </style>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label">∶</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="minutes_label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label">00</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
-                            <attributes>
-                              <attribute name="font-features" value="tnum=1"/>
-                            </attributes>
-                            <style>
-                              <class name="minutes-label"/>
-                            </style>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label">∶</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="seconds_label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label">00</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
-                            <attributes>
-                              <attribute name="font-features" value="tnum=1"/>
-                            </attributes>
-                            <style>
-                              <class name="seconds-label"/>
-                            </style>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label">.</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">5</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="miliseconds_label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="valign">end</property>
-                            <property name="ypad">6</property>
-                            <property name="label">0</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
-                            <attributes>
-                              <attribute name="font-features" value="tnum=1"/>
-                            </attributes>
-                            <style>
-                              <class name="miliseconds-label"/>
-                            </style>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">6</property>
-                          </packing>
-                        </child>
+                        <property name="label">00</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0</property>
+                        <attributes>
+                          <attribute name="font-features" value="tnum=1"/>
+                        </attributes>
                         <style>
-                          <class name="stopped-stopwatch"/>
+                          <class name="hours-label"/>
                         </style>
                       </object>
                       <packing>
@@ -167,51 +50,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkBox">
+                      <object class="GtkLabel">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="border_width">12</property>
-                        <child>
-                          <object class="GtkButton" id="start_btn">
-                            <property name="label" translatable="yes">_Start</property>
-                            <property name="width_request">120</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="use_underline">True</property>
-                            <signal name="clicked" handler="on_start_btn_clicked" swapped="no"/>
-                            <style>
-                              <class name="suggested-action"/>
-                              <class name="large-button"/>
-                              <class name="pill-button"/>
-                            </style>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="clear_btn">
-                            <property name="label" translatable="yes">Clear</property>
-                            <property name="width_request">120</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <signal name="clicked" handler="on_clear_btn_clicked" swapped="no"/>
-                            <style>
-                              <class name="large-button"/>
-                              <class name="pill-button"/>
-                            </style>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="pack_type">end</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
+                        <property name="label">∶</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -220,30 +62,181 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkRevealer" id="laps_revealer">
+                      <object class="GtkLabel" id="minutes_label">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="transition_type">crossfade</property>
-                        <child>
-                          <object class="GtkListBox" id="laps_list">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="valign">start</property>
-                            <property name="selection_mode">none</property>
-                            <style>
-                              <class name="preferences"/>
-                              <class name="clocks-list"/>
-                            </style>
-                          </object>
-                        </child>
+                        <property name="label">00</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0</property>
+                        <attributes>
+                          <attribute name="font-features" value="tnum=1"/>
+                        </attributes>
+                        <style>
+                          <class name="minutes-label"/>
+                        </style>
                       </object>
                       <packing>
-                        <property name="expand">True</property>
+                        <property name="expand">False</property>
                         <property name="fill">True</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label">∶</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="seconds_label">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label">00</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0</property>
+                        <attributes>
+                          <attribute name="font-features" value="tnum=1"/>
+                        </attributes>
+                        <style>
+                          <class name="seconds-label"/>
+                        </style>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label">.</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">5</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="miliseconds_label">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="valign">end</property>
+                        <property name="ypad">6</property>
+                        <property name="label">0</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0</property>
+                        <attributes>
+                          <attribute name="font-features" value="tnum=1"/>
+                        </attributes>
+                        <style>
+                          <class name="miliseconds-label"/>
+                        </style>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">6</property>
+                      </packing>
+                    </child>
+                    <style>
+                      <class name="stopped-stopwatch"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="border_width">12</property>
+                    <child>
+                      <object class="GtkButton" id="start_btn">
+                        <property name="label" translatable="yes">_Start</property>
+                        <property name="width_request">120</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="use_underline">True</property>
+                        <signal name="clicked" handler="on_start_btn_clicked" swapped="no"/>
+                        <style>
+                          <class name="suggested-action"/>
+                          <class name="large-button"/>
+                          <class name="pill-button"/>
+                        </style>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="clear_btn">
+                        <property name="label" translatable="yes">Clear</property>
+                        <property name="width_request">120</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <signal name="clicked" handler="on_clear_btn_clicked" swapped="no"/>
+                        <style>
+                          <class name="large-button"/>
+                          <class name="pill-button"/>
+                        </style>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="pack_type">end</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRevealer" id="laps_revealer">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="transition_type">crossfade</property>
+                    <child>
+                      <object class="GtkListBox" id="laps_list">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="valign">start</property>
+                        <property name="selection_mode">none</property>
+                        <style>
+                          <class name="preferences"/>
+                          <class name="clocks-list"/>
+                        </style>
+                      </object>
+                    </child>
                   </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
                 </child>
               </object>
             </child>
diff --git a/data/ui/world-face.ui b/data/ui/world-face.ui
index 5b973e6..93c27e8 100644
--- a/data/ui/world-face.ui
+++ b/data/ui/world-face.ui
@@ -6,38 +6,42 @@
     <property name="can_focus">False</property>
     <property name="homogeneous">False</property>
     <child>
-      <object class="GtkGrid" id="empty_view">
+      <object class="GtkBox" id="empty_view">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="halign">center</property>
         <property name="valign">center</property>
-        <property name="row_spacing">6</property>
+        <property name="spacing">36</property>
         <child>
-          <object class="GtkImage" id="image1">
+          <object class="GtkImage">
             <property name="visible">True</property>
             <property name="sensitive">False</property>
             <property name="can_focus">False</property>
-            <property name="icon_name">document-open-recent-symbolic</property>
-            <property name="icon-size">6</property>
+            <property name="icon_name">globe-centered-symbolic</property>
+            <property name="pixel_size">128</property>
+            <style>
+              <class name="dim-label"/>
+            </style>
           </object>
           <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">0</property>
+            <property name="position">0</property>
           </packing>
         </child>
         <child>
-          <object class="GtkLabel" id="label1">
+          <object class="GtkButton">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label" translatable="yes">Select &lt;b&gt;New&lt;/b&gt; to add a world 
clock</property>
-            <property name="use_markup">True</property>
+            <property name="action-name">win.new</property>
+            <property name="label" translatable="yes">Add World Clock</property>
+            <property name="halign">center</property>
             <style>
-              <class name="dim-label"/>
+              <class name="suggested-action"/>
+              <class name="large-button"/>
+              <class name="pill-button"/>
             </style>
           </object>
           <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">1</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/stopwatch-face.vala b/src/stopwatch-face.vala
index a98799e..fd73d69 100644
--- a/src/stopwatch-face.vala
+++ b/src/stopwatch-face.vala
@@ -63,6 +63,9 @@ public class Face : Gtk.Box, Clocks.Clock {
     [GtkChild]
     private Gtk.Revealer laps_revealer;
 
+    [GtkChild]
+    private Gtk.Box container;
+
     [GtkChild]
     private Gtk.Button start_btn;
     [GtkChild]
@@ -88,6 +91,16 @@ public class Face : Gtk.Box, Clocks.Clock {
             return lap_row;
         });
 
+        laps.items_changed.connect (() => {
+            if (laps.get_n_items () == 0) {
+                this.container.valign = CENTER;
+                this.container.margin_top = 0;
+            } else {
+                this.container.valign = FILL;
+                this.container.margin_top = 36;
+            }
+        });
+
         map.connect ((w) => {
             if (state == State.RUNNING) {
                 update_time_label ();



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