[gnome-break-timer/gtk-4: 1/2] Add Gtk4 UI files for WelcomePanel




commit 02bc15f16e7ca408da159884bcefa8fd3294858d
Author: Dylan McCall <dylan dylanmccall ca>
Date:   Sat Jul 30 11:45:47 2022 -0700

    Add Gtk4 UI files for WelcomePanel

 data/gresource/org.gnome.BreakTimer.gresource.xml |   2 +
 src/settings/Application.vala                     |  39 +----
 src/settings/MainWindow.vala                      |   1 +
 src/settings/panels/WelcomePanel.vala             | 129 +++++-----------
 ui/settings-panels-gtk4.cmb                       | 107 +++++++++++++
 ui/settings-panels-gtk4.ui                        | 173 ++++++++++++++++++++++
 ui/settings-panels.cmb                            | 158 ++++++++++++++++++++
 ui/settings.css                                   |  25 ++++
 8 files changed, 512 insertions(+), 122 deletions(-)
---
diff --git a/data/gresource/org.gnome.BreakTimer.gresource.xml 
b/data/gresource/org.gnome.BreakTimer.gresource.xml
index 65bd04f..ea34813 100644
--- a/data/gresource/org.gnome.BreakTimer.gresource.xml
+++ b/data/gresource/org.gnome.BreakTimer.gresource.xml
@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gresources>
   <gresource prefix="/org/gnome/BreakTimer/settings">
+    <file>ui/settings.css</file>
     <file preprocess="xml-stripblanks">ui/settings-panels.ui</file>
+    <file preprocess="xml-stripblanks">ui/settings-panels-gtk4.ui</file>
   </gresource>
 </gresources>
diff --git a/src/settings/Application.vala b/src/settings/Application.vala
index 5aed44f..7e8ffbd 100644
--- a/src/settings/Application.vala
+++ b/src/settings/Application.vala
@@ -21,35 +21,6 @@
 namespace BreakTimer.Settings {
 
 public class Application : Adw.Application {
-    private const string STYLE_DATA =
-        """
-        ._settings-title {
-            font-weight:bold;
-        }
-
-        ._break-info {
-        }
-
-        ._break-info-heading {
-            font-size: xx-large;
-        }
-
-        ._break-status-heading {
-            font-size: larger;
-        }
-
-        ._break-status-body {
-        }
-
-        ._break-status-hint {
-            font-size: small;
-        }
-
-        ._break-status-icon {
-            opacity: 0.2;
-        }
-        """;
-
     private BreakManager break_manager;
     private MainWindow main_window;
     private bool initial_focus = true;
@@ -80,11 +51,11 @@ public class Application : Adw.Application {
         Gtk.CssProvider style_provider = new Gtk.CssProvider ();
 
         // FIXME
-        // try {
-        //     style_provider.load_from_data (STYLE_DATA, -1);
-        // } catch (GLib.Error error) {
-        //     GLib.warning ("Error loading style data: %s", error.message);
-        // }
+        try {
+            style_provider.load_from_resource ("/org/gnome/BreakTimer/settings/ui/settings.css");
+        } catch (GLib.Error error) {
+            GLib.warning ("Error loading stylesheet: %s", error.message);
+        }
 
         Gtk.StyleContext.add_provider_for_display (
             Gdk.Display.get_default (),
diff --git a/src/settings/MainWindow.vala b/src/settings/MainWindow.vala
index cd77ea3..250600a 100644
--- a/src/settings/MainWindow.vala
+++ b/src/settings/MainWindow.vala
@@ -116,6 +116,7 @@ public class MainWindow : Adw.ApplicationWindow, GLib.Initable {
         Gtk.Builder builder = new Gtk.Builder ();
         try {
             builder.add_from_resource ("/org/gnome/BreakTimer/settings/ui/settings-panels.ui");
+            builder.add_from_resource ("/org/gnome/BreakTimer/settings/ui/settings-panels-gtk4.ui");
         } catch (GLib.Error e) {
             GLib.error ("Error loading UI: %s", e.message);
         }
diff --git a/src/settings/panels/WelcomePanel.vala b/src/settings/panels/WelcomePanel.vala
index 0eba10d..9a8e70c 100644
--- a/src/settings/panels/WelcomePanel.vala
+++ b/src/settings/panels/WelcomePanel.vala
@@ -22,24 +22,15 @@ using BreakTimer.Settings.Widgets;
 
 namespace BreakTimer.Settings.Panels {
 
-/* TODO: It would be nice to move some of this code to a UI file built with
- *       Glade. Especially anything involving long strings. */
 private class WelcomePanel : Gtk.Box {
     private BreakManager break_manager;
     private MainWindow main_window;
 
-    private enum Step {
-        WELCOME,
-        BREAKS,
-        READY
-    }
-    private Step current_step;
-
-    private Gtk.Stack stack;
+    private Adw.Leaflet stack;
 
-    private Gtk.Box start_page;
-    private Gtk.Box breaks_page;
-    private Gtk.Box ready_page;
+    private Gtk.Overlay start_page;
+    private Gtk.Overlay breaks_page;
+    private Gtk.Overlay ready_page;
 
     public signal void tour_finished ();
 
@@ -49,99 +40,61 @@ private class WelcomePanel : Gtk.Box {
         this.break_manager = break_manager;
         this.main_window = main_window;
 
-        this.stack = new Gtk.Stack ();
-        this.append (this.stack);
-        this.stack.show ();
-
-        if (this.break_manager.master_enabled) {
-            this.current_step = Step.READY;
-        } else {
-            this.current_step = Step.WELCOME;
-        }
-
-        this.stack.set_transition_type (Gtk.StackTransitionType.SLIDE_LEFT);
-        this.stack.set_transition_duration (250);
+        this.stack = (Adw.Leaflet) builder.get_object ("welcome_stack");
+        this.start_page = (Gtk.Overlay) builder.get_object ("welcome_start_overlay");
+        this.breaks_page = (Gtk.Overlay) builder.get_object ("welcome_breaks_overlay");
+        this.ready_page = (Gtk.Overlay) builder.get_object ("welcome_ready_overlay");
+        var breaks_ok_button = (Gtk.Button) builder.get_object ("welcome_breaks_ok_button");
+        var ready_ok_button = (Gtk.Button) builder.get_object ("welcome_ready_ok_button");
+
+        breaks_ok_button.clicked.connect(
+            () => this.stack.navigate(Adw.NavigationDirection.FORWARD)
+        );
+
+        ready_ok_button.clicked.connect (
+            () => this.tour_finished()
+        );
+
+        this.build_overlay_arrow (
+            this.start_page,
+            (Gtk.Widget) builder.get_object ("welcome_switch_label"),
+            main_window.get_master_switch ()
+        );
+
+        this.build_overlay_arrow (
+            this.breaks_page,
+            (Gtk.Widget) builder.get_object ("welcome_settings_label"),
+            main_window.get_settings_button ()
+        );
 
-        this.start_page = this.build_page_with_arrow (
-            builder, "welcome_start", "switch_on_label", main_window.get_master_switch ());
-        this.stack.add_child (this.start_page);
-
-        this.breaks_page = this.build_page_with_arrow (
-            builder, "welcome_breaks", "settings_label", main_window.get_settings_button ());
-        this.stack.add_child (this.breaks_page);
-
-        this.ready_page = this.build_page_with_arrow (
-            builder, "welcome_ready", "keeps_running_label", main_window.get_close_button ());
-        this.stack.add_child (this.ready_page);
-
-        var breaks_ok_button = new Gtk.Button.with_label (_("OK, got it!"));
-        breaks_ok_button.get_style_context ().add_class ("suggested-action");
-        breaks_ok_button.set_halign (Gtk.Align.CENTER);
-        this.breaks_page.append (breaks_ok_button);
-        breaks_ok_button.clicked.connect (this.on_breaks_confirmed);
-
-        var ready_ok_button = new Gtk.Button.with_label (_("Ready to go"));
-        ready_ok_button.get_style_context ().add_class ("suggested-action");
-        ready_ok_button.set_halign (Gtk.Align.CENTER);
-        this.ready_page.append (ready_ok_button);
-        ready_ok_button.clicked.connect (this.on_ready_confirmed);
+        this.append (this.stack);
 
         break_manager.notify["master-enabled"].connect (this.on_master_switch_toggled);
     }
 
     public bool is_active () {
-        return this.current_step < Step.READY;
+        return this.stack.get_visible_child() == this.start_page || this.stack.get_visible_child() == 
this.breaks_page;
     }
 
     internal void settings_button_clicked () {
-        if (this.current_step == Step.BREAKS) {
-            this.on_breaks_confirmed ();
+        if (this.stack.get_visible_child() == this.breaks_page) {
+            this.stack.navigate(Adw.NavigationDirection.FORWARD);
         }
     }
 
     private void on_master_switch_toggled () {
-        if (this.break_manager.master_enabled) {
-            this.advance_current_step (Step.BREAKS);
-        } else {
-            // TODO: Should we jump back to the first step, or keep going?
+        if (!this.break_manager.master_enabled) {
+            return;
         }
-    }
-
-    private Gtk.Box build_page_with_arrow (Gtk.Builder builder, string page_name, string? arrow_source_name, 
Gtk.Widget? arrow_target) {
-        Gtk.Box page_wrapper = new Gtk.Box (Gtk.Orientation.VERTICAL, 16);
-        page_wrapper.set_margin_bottom (30);
-
-        Gtk.Overlay page_overlay = new Gtk.Overlay ();
-        page_wrapper.append (page_overlay);
 
-        page_overlay.set_child (builder.get_object (page_name) as Gtk.Widget);
-        Gtk.Widget arrow_source = builder.get_object (arrow_source_name) as Gtk.Widget;
-        if (arrow_source != null && arrow_target != null) {
-            var arrow = new OverlayArrow (arrow_source, arrow_target);
-            page_overlay.add_overlay (arrow);
+        if (this.stack.get_visible_child() == this.start_page) {
+            this.stack.navigate(Adw.NavigationDirection.FORWARD);
         }
-
-        return page_wrapper;
-    }
-
-    private void on_breaks_confirmed () {
-        this.advance_current_step (Step.READY);
-    }
-
-    private void on_ready_confirmed () {
-        this.tour_finished ();
     }
 
-    private void advance_current_step (Step next_step) {
-        if (next_step > this.current_step) this.current_step = next_step;
-
-        if (this.current_step == Step.WELCOME) {
-            this.stack.set_visible_child (this.start_page);
-        } else if (this.current_step == Step.BREAKS) {
-            this.stack.set_visible_child (this.breaks_page);
-        } else {
-            this.stack.set_visible_child (this.ready_page);
-        }
+    private void build_overlay_arrow (Gtk.Overlay overlay, Gtk.Widget arrow_source, Gtk.Widget arrow_target) 
{
+        var arrow = new OverlayArrow (arrow_source, arrow_target);
+        overlay.add_overlay (arrow);
     }
 }
 
diff --git a/ui/settings-panels-gtk4.cmb b/ui/settings-panels-gtk4.cmb
new file mode 100644
index 0000000..ab50040
--- /dev/null
+++ b/ui/settings-panels-gtk4.cmb
@@ -0,0 +1,107 @@
+<?xml version='1.0' encoding='UTF-8' standalone='no'?>
+<!DOCTYPE cambalache-project SYSTEM "cambalache-project.dtd">
+<cambalache-project version="0.10.3" target_tk="gtk-4.0">
+  <ui>
+       (1,None,"settings-panels-gtk4.ui","settings-panels-gtk4.ui",None,None,None,None,None,None)
+  </ui>
+  <object>
+       (1,5,"AdwLeaflet","welcome_stack",None,None,None,None,None),
+       (1,25,"GtkOverlay","welcome_ready_overlay",5,None,None,None,2),
+       (1,30,"GtkOverlay","welcome_start_overlay",5,None,None,None,None),
+       (1,35,"GtkOverlay","welcome_breaks_overlay",5,None,None,None,1),
+       (1,43,"GtkCenterBox",None,25,None,None,None,-1),
+       (1,44,"GtkBox",None,43,None,"center",None,-1),
+       (1,53,"GtkLabel",None,44,None,None,None,None),
+       (1,54,"GtkLabel",None,44,None,None,None,1),
+       (1,60,"GtkCenterBox",None,30,None,None,None,-1),
+       (1,61,"GtkBox",None,60,None,"center",None,-1),
+       (1,62,"GtkLabel",None,61,None,None,None,None),
+       (1,63,"GtkLabel",None,61,None,None,None,1),
+       (1,64,"GtkLabel","welcome_switch_label",61,None,None,None,2),
+       (1,72,"GtkCenterBox",None,35,None,None,None,-1),
+       (1,73,"GtkBox",None,72,None,"center",None,-1),
+       (1,74,"GtkLabel",None,73,None,None,None,None),
+       (1,75,"GtkLabel",None,73,None,None,None,1),
+       (1,76,"GtkLabel",None,73,None,None,None,2),
+       (1,77,"GtkLabel",None,73,None,None,None,3),
+       (1,78,"GtkBox",None,72,None,"end",None,-1),
+       (1,79,"GtkLabel","welcome_settings_label",78,None,None,None,None),
+       (1,80,"GtkButton","welcome_breaks_ok_button",78,None,None,None,1),
+       (1,83,"GtkBox",None,43,None,"end",None,-1),
+       (1,84,"GtkButton","welcome_ready_ok_button",83,None,None,None,None)
+  </object>
+  <object_property>
+       (1,5,"AdwLeaflet","can-unfold","False",None,None,None,None,None),
+       (1,5,"AdwLeaflet","transition-type","slide",None,None,None,None,None),
+       (1,43,"GtkOrientable","orientation","vertical",None,None,None,None,None),
+       (1,43,"GtkWidget","vexpand","True",None,None,None,None,None),
+       (1,44,"GtkBox","spacing","16",None,None,None,None,None),
+       (1,44,"GtkOrientable","orientation","vertical",None,None,None,None,None),
+       (1,44,"GtkWidget","margin-bottom","30",None,None,None,None,None),
+       (1,44,"GtkWidget","margin-top","30",None,None,None,None,None),
+       (1,53,"GtkLabel","label","You can leave me to it","yes",None,None,None,None),
+       (1,53,"GtkLabel","wrap","True",None,None,None,None,None),
+       (1,53,"GtkWidget","css-classes","large-title",None,None,None,None,None),
+       (1,54,"GtkLabel","label","Break Timer will carry on working in the background, even if you close 
it.","yes",None,None,None,None),
+       (1,54,"GtkLabel","wrap","True",None,None,None,None,None),
+       (1,54,"GtkWidget","css-classes","body",None,None,None,None,None),
+       (1,60,"GtkOrientable","orientation","vertical",None,None,None,None,None),
+       (1,60,"GtkWidget","vexpand","True",None,None,None,None,None),
+       (1,61,"GtkBox","spacing","16",None,None,None,None,None),
+       (1,61,"GtkOrientable","orientation","vertical",None,None,None,None,None),
+       (1,61,"GtkWidget","margin-bottom","30",None,None,None,None,None),
+       (1,61,"GtkWidget","margin-top","30",None,None,None,None,None),
+       (1,62,"GtkLabel","label","Welcome to Break Timer!","yes",None,None,None,None),
+       (1,62,"GtkLabel","wrap","True",None,None,None,None,None),
+       (1,62,"GtkWidget","css-classes","large-title",None,None,None,None,None),
+       (1,63,"GtkLabel","label","Breaks are good for you. We'll help you to take 
them.","yes",None,None,None,None),
+       (1,63,"GtkLabel","wrap","True",None,None,None,None,None),
+       (1,63,"GtkWidget","css-classes","body",None,None,None,None,None),
+       (1,64,"GtkLabel","label","Just switch me on to get started","yes",None,None,None,None),
+       (1,64,"GtkLabel","wrap","True",None,None,None,None,None),
+       (1,64,"GtkWidget","css-classes","caption",None,None,None,None,None),
+       (1,64,"GtkWidget","halign","center",None,None,None,None,None),
+       (1,64,"GtkWidget","margin-end","8",None,None,None,None,None),
+       (1,64,"GtkWidget","margin-start","8",None,None,None,None,None),
+       (1,64,"GtkWidget","margin-top","50",None,None,None,None,None),
+       (1,72,"GtkOrientable","orientation","vertical",None,None,None,None,None),
+       (1,72,"GtkWidget","vexpand","True",None,None,None,None,None),
+       (1,73,"GtkBox","spacing","16",None,None,None,None,None),
+       (1,73,"GtkOrientable","orientation","vertical",None,None,None,None,None),
+       (1,73,"GtkWidget","margin-bottom","30",None,None,None,None,None),
+       (1,73,"GtkWidget","margin-top","30",None,None,None,None,None),
+       (1,74,"GtkLabel","label","Break and micro breaks","yes",None,None,None,None),
+       (1,74,"GtkLabel","wrap","True",None,None,None,None,None),
+       (1,74,"GtkWidget","css-classes","large-title",None,None,None,None,None),
+       (1,75,"GtkLabel","label","Break Timer lets you take small micro breaks as well as longer 
breaks.","yes",None,None,None,None),
+       (1,75,"GtkLabel","wrap","True",None,None,None,None,None),
+       (1,75,"GtkWidget","css-classes","body",None,None,None,None,None),
+       (1,76,"GtkLabel","label","Micro breaks are a chance to look away from the screen and rest your 
hands.","yes",None,None,None,None),
+       (1,76,"GtkLabel","wrap","True",None,None,None,None,None),
+       (1,76,"GtkWidget","css-classes","body",None,None,None,None,None),
+       (1,77,"GtkLabel","label","Full breaks are time to get away from your computer and move 
around.","yes",None,None,None,None),
+       (1,77,"GtkLabel","wrap","True",None,None,None,None,None),
+       (1,77,"GtkWidget","css-classes","body",None,None,None,None,None),
+       (1,78,"GtkBox","spacing","16",None,None,None,None,None),
+       (1,78,"GtkOrientable","orientation","vertical",None,None,None,None,None),
+       (1,78,"GtkWidget","margin-bottom","30",None,None,None,None,None),
+       (1,78,"GtkWidget","margin-top","30",None,None,None,None,None),
+       (1,79,"GtkLabel","label","You can change the types of breaks and their timings from the 
settings","yes",None,None,None,None),
+       (1,79,"GtkLabel","wrap","True",None,None,None,None,None),
+       (1,79,"GtkWidget","css-classes","caption",None,None,None,None,None),
+       (1,79,"GtkWidget","halign","center",None,None,None,None,None),
+       (1,79,"GtkWidget","margin-end","8",None,None,None,None,None),
+       (1,79,"GtkWidget","margin-start","8",None,None,None,None,None),
+       (1,79,"GtkWidget","valign","start",None,None,None,None,None),
+       (1,80,"GtkButton","label","OK, got it!","yes",None,None,None,None),
+       (1,80,"GtkWidget","css-classes","suggested-action",None,None,None,None,None),
+       (1,80,"GtkWidget","halign","center",None,None,None,None,None),
+       (1,83,"GtkBox","spacing","16",None,None,None,None,None),
+       (1,83,"GtkOrientable","orientation","vertical",None,None,None,None,None),
+       (1,83,"GtkWidget","margin-bottom","30",None,None,None,None,None),
+       (1,83,"GtkWidget","margin-top","30",None,None,None,None,None),
+       (1,84,"GtkButton","label","Ready to go","yes",None,None,None,None),
+       (1,84,"GtkWidget","css-classes","suggested-action",None,None,None,None,None),
+       (1,84,"GtkWidget","halign","center",None,None,None,None,None)
+  </object_property>
+</cambalache-project>
diff --git a/ui/settings-panels-gtk4.ui b/ui/settings-panels-gtk4.ui
new file mode 100644
index 0000000..869bc38
--- /dev/null
+++ b/ui/settings-panels-gtk4.ui
@@ -0,0 +1,173 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Created with Cambalache 0.10.3 -->
+<interface>
+  <!-- interface-name settings-panels-gtk4.ui -->
+  <requires lib="gtk" version="4.6"/>
+  <requires lib="libadwaita" version="1.1"/>
+  <object class="AdwLeaflet" id="welcome_stack">
+    <property name="can-unfold">False</property>
+    <property name="transition-type">slide</property>
+    <child>
+      <object class="GtkOverlay" id="welcome_start_overlay">
+        <child>
+          <object class="GtkCenterBox">
+            <property name="orientation">vertical</property>
+            <property name="vexpand">True</property>
+            <child type="center">
+              <object class="GtkBox">
+                <property name="margin-bottom">30</property>
+                <property name="margin-top">30</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">16</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="css-classes">large-title</property>
+                    <property name="label" translatable="yes">Welcome to Break Timer!</property>
+                    <property name="wrap">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="css-classes">body</property>
+                    <property name="label" translatable="yes">Breaks are good for you. We'll help you to 
take them.</property>
+                    <property name="wrap">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="welcome_switch_label">
+                    <property name="css-classes">caption</property>
+                    <property name="halign">center</property>
+                    <property name="label" translatable="yes">Just switch me on to get started</property>
+                    <property name="margin-end">8</property>
+                    <property name="margin-start">8</property>
+                    <property name="margin-top">50</property>
+                    <property name="wrap">True</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+    <child>
+      <object class="GtkOverlay" id="welcome_breaks_overlay">
+        <child>
+          <object class="GtkCenterBox">
+            <property name="orientation">vertical</property>
+            <property name="vexpand">True</property>
+            <child type="center">
+              <object class="GtkBox">
+                <property name="margin-bottom">30</property>
+                <property name="margin-top">30</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">16</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="css-classes">large-title</property>
+                    <property name="label" translatable="yes">Break and micro breaks</property>
+                    <property name="wrap">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="css-classes">body</property>
+                    <property name="label" translatable="yes">Break Timer lets you take small micro breaks 
as well as longer breaks.</property>
+                    <property name="wrap">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="css-classes">body</property>
+                    <property name="label" translatable="yes">Micro breaks are a chance to look away from 
the screen and rest your hands.</property>
+                    <property name="wrap">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="css-classes">body</property>
+                    <property name="label" translatable="yes">Full breaks are time to get away from your 
computer and move around.</property>
+                    <property name="wrap">True</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="end">
+              <object class="GtkBox">
+                <property name="margin-bottom">30</property>
+                <property name="margin-top">30</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">16</property>
+                <child>
+                  <object class="GtkLabel" id="welcome_settings_label">
+                    <property name="css-classes">caption</property>
+                    <property name="halign">center</property>
+                    <property name="label" translatable="yes">You can change the types of breaks and their 
timings from the settings</property>
+                    <property name="margin-end">8</property>
+                    <property name="margin-start">8</property>
+                    <property name="valign">start</property>
+                    <property name="wrap">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="welcome_breaks_ok_button">
+                    <property name="css-classes">suggested-action</property>
+                    <property name="halign">center</property>
+                    <property name="label" translatable="yes">OK, got it!</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+    <child>
+      <object class="GtkOverlay" id="welcome_ready_overlay">
+        <child>
+          <object class="GtkCenterBox">
+            <property name="orientation">vertical</property>
+            <property name="vexpand">True</property>
+            <child type="center">
+              <object class="GtkBox">
+                <property name="margin-bottom">30</property>
+                <property name="margin-top">30</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">16</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="css-classes">large-title</property>
+                    <property name="label" translatable="yes">You can leave me to it</property>
+                    <property name="wrap">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="css-classes">body</property>
+                    <property name="label" translatable="yes">Break Timer will carry on working in the 
background, even if you close it.</property>
+                    <property name="wrap">True</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="end">
+              <object class="GtkBox">
+                <property name="margin-bottom">30</property>
+                <property name="margin-top">30</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">16</property>
+                <child>
+                  <object class="GtkButton" id="welcome_ready_ok_button">
+                    <property name="css-classes">suggested-action</property>
+                    <property name="halign">center</property>
+                    <property name="label" translatable="yes">Ready to go</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/ui/settings-panels.cmb b/ui/settings-panels.cmb
new file mode 100644
index 0000000..7e4e6ee
--- /dev/null
+++ b/ui/settings-panels.cmb
@@ -0,0 +1,158 @@
+<?xml version='1.0' encoding='UTF-8' standalone='no'?>
+<!DOCTYPE cambalache-project SYSTEM "cambalache-project.dtd">
+<cambalache-project version="0.10.3" target_tk="gtk+-3.0">
+  <ui>
+       (1,None,"settings-panels.ui","settings-panels.ui",None,None,None,None,None,None)
+  </ui>
+  <ui_library>
+       (1,"gtk+","3.0",None)
+  </ui_library>
+  <object>
+       (1,1,"GtkBox","status_error",None,None,None,None,None),
+       (1,2,"GtkImage","image2",1,None,None,None,None),
+       (1,3,"GtkLabel","label13",1,None,None,None,1),
+       (1,4,"GtkLabel","label14",1,None,None,None,2),
+       (1,5,"GtkBox","status_stopped",None,None,None,None,None),
+       (1,6,"GtkImage","image1",5,None,None,None,None),
+       (1,7,"GtkLabel","label11",5,None,None,None,1),
+       (1,8,"GtkLabel","label12",5,None,None,None,2),
+       (1,9,"GtkBox","welcome_breaks",None,None,None,None,None),
+       (1,10,"GtkBox","welcome_breaks_inner",9,None,None,None,None),
+       (1,11,"GtkLabel","settings_label",10,None,None,None,None),
+       (1,12,"GtkBox","grid2",10,None,None,None,1),
+       (1,13,"GtkLabel","label2",12,None,None,None,None),
+       (1,14,"GtkLabel","label3",12,None,None,None,1),
+       (1,15,"GtkLabel","label4",12,None,None,None,2),
+       (1,16,"GtkLabel","label1",12,None,None,None,3)
+  </object>
+  <object_property>
+       (1,1,"GtkOrientable","orientation","vertical",None,None,None,None,None),
+       (1,1,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,1,"GtkWidget","margin-bottom","20",None,None,None,None,None),
+       (1,1,"GtkWidget","margin-end","30",None,None,None,None,None),
+       (1,1,"GtkWidget","margin-start","30",None,None,None,None,None),
+       (1,1,"GtkWidget","margin-top","10",None,None,None,None,None),
+       (1,1,"GtkWidget","valign","center",None,None,None,None,None),
+       (1,1,"GtkWidget","vexpand","True",None,None,None,None,None),
+       (1,1,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,2,"GtkImage","icon-name","face-sick-symbolic",None,None,None,None,None),
+       (1,2,"GtkImage","pixel-size","120",None,None,None,None,None),
+       (1,2,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,2,"GtkWidget","hexpand","True",None,None,None,None,None),
+       (1,2,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,3,"GtkLabel","label","Break Timer isn’t responding","yes",None,None,None,None),
+       (1,3,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,3,"GtkWidget","hexpand","True",None,None,None,None,None),
+       (1,3,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,4,"GtkLabel","label","If this continues the next time you log in, please &lt;a 
href=\"https://gitlab.gnome.org/GNOME/gnome-break-timer/issues\"&gt;open a bug report&lt;/a&gt;.      
","yes",None,None,None,None),
+       (1,4,"GtkLabel","use-markup","True",None,None,None,None,None),
+       (1,4,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,4,"GtkWidget","hexpand","True",None,None,None,None,None),
+       (1,4,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,5,"GtkBox","spacing","12",None,None,None,None,None),
+       (1,5,"GtkOrientable","orientation","vertical",None,None,None,None,None),
+       (1,5,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,5,"GtkWidget","margin-bottom","20",None,None,None,None,None),
+       (1,5,"GtkWidget","margin-end","30",None,None,None,None,None),
+       (1,5,"GtkWidget","margin-start","30",None,None,None,None,None),
+       (1,5,"GtkWidget","margin-top","10",None,None,None,None,None),
+       (1,5,"GtkWidget","valign","center",None,None,None,None,None),
+       (1,5,"GtkWidget","vexpand","True",None,None,None,None,None),
+       (1,5,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,6,"GtkImage","icon-name","face-sad-symbolic",None,None,None,None,None),
+       (1,6,"GtkImage","pixel-size","120",None,None,None,None,None),
+       (1,6,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,6,"GtkWidget","hexpand","True",None,None,None,None,None),
+       (1,6,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,7,"GtkLabel","label","Break Timer is taking a break","yes",None,None,None,None),
+       (1,7,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,7,"GtkWidget","hexpand","True",None,None,None,None,None),
+       (1,7,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,8,"GtkLabel","label","Turn me on to get those breaks going","yes",None,None,None,None),
+       (1,8,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,8,"GtkWidget","hexpand","True",None,None,None,None,None),
+       (1,8,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,9,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,9,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,10,"GtkBox","spacing","50",None,None,None,None,None),
+       (1,10,"GtkOrientable","orientation","vertical",None,None,None,None,None),
+       (1,10,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,10,"GtkWidget","margin-end","85",None,None,None,None,None),
+       (1,10,"GtkWidget","margin-start","85",None,None,None,None,None),
+       (1,10,"GtkWidget","margin-top","30",None,None,None,None,None),
+       (1,10,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,11,"GtkLabel","label","You can change the types of breaks and their timings from the 
settings","yes",None,None,None,None),
+       (1,11,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,11,"GtkWidget","halign","center",None,None,None,None,None),
+       (1,11,"GtkWidget","margin-end","20",None,None,None,None,None),
+       (1,11,"GtkWidget","margin-start","20",None,None,None,None,None),
+       (1,11,"GtkWidget","valign","end",None,None,None,None,None),
+       (1,11,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,12,"GtkBox","spacing","16",None,None,None,None,None),
+       (1,12,"GtkOrientable","orientation","vertical",None,None,None,None,None),
+       (1,12,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,12,"GtkWidget","hexpand","True",None,None,None,None,None),
+       (1,12,"GtkWidget","valign","center",None,None,None,None,None),
+       (1,12,"GtkWidget","vexpand","True",None,None,None,None,None),
+       (1,12,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,13,"GtkLabel","label","Break Timer lets you take small microbreaks as well as longer 
breaks.","yes",None,None,None,None),
+       (1,13,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,13,"GtkWidget","hexpand","True",None,None,None,None,None),
+       (1,13,"GtkWidget","margin-bottom","4",None,None,None,None,None),
+       (1,13,"GtkWidget","margin-top","4",None,None,None,None,None),
+       (1,13,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,14,"GtkLabel","label","Microbreaks are a chance to look away from the screen and rest your 
hands.","yes",None,None,None,None),
+       (1,14,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,14,"GtkWidget","hexpand","True",None,None,None,None,None),
+       (1,14,"GtkWidget","margin-bottom","4",None,None,None,None,None),
+       (1,14,"GtkWidget","margin-top","4",None,None,None,None,None),
+       (1,14,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,15,"GtkLabel","label","Full breaks are time to get away from the computer and move 
around.","yes",None,None,None,None),
+       (1,15,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,15,"GtkWidget","hexpand","True",None,None,None,None,None),
+       (1,15,"GtkWidget","margin-bottom","4",None,None,None,None,None),
+       (1,15,"GtkWidget","margin-top","4",None,None,None,None,None),
+       (1,15,"GtkWidget","visible","True",None,None,None,None,None),
+       (1,16,"GtkLabel","label","Breaks and Microbreaks","yes",None,None,None,None),
+       (1,16,"GtkWidget","can-focus","False",None,None,None,None,None),
+       (1,16,"GtkWidget","hexpand","True",None,None,None,None,None),
+       (1,16,"GtkWidget","visible","True",None,None,None,None,None)
+  </object_property>
+  <object_data>
+       (1,2,"GtkWidget",1,1,None,None,None),
+       (1,2,"GtkWidget",2,2,None,1,None),
+       (1,3,"GtkWidget",1,1,None,None,None),
+       (1,3,"GtkWidget",2,2,None,1,None),
+       (1,4,"GtkWidget",1,1,None,None,None),
+       (1,4,"GtkWidget",2,2,None,1,None),
+       (1,6,"GtkWidget",1,1,None,None,None),
+       (1,6,"GtkWidget",2,2,None,1,None),
+       (1,7,"GtkWidget",1,1,None,None,None),
+       (1,7,"GtkWidget",2,2,None,1,None),
+       (1,8,"GtkWidget",1,1,None,None,None),
+       (1,8,"GtkWidget",2,2,None,1,None),
+       (1,11,"GtkWidget",1,1,None,None,None),
+       (1,11,"GtkWidget",2,2,None,1,None),
+       (1,13,"GtkWidget",1,1,None,None,None),
+       (1,13,"GtkWidget",2,2,None,1,None),
+       (1,14,"GtkWidget",1,1,None,None,None),
+       (1,14,"GtkWidget",2,2,None,1,None),
+       (1,15,"GtkWidget",1,1,None,None,None),
+       (1,15,"GtkWidget",2,2,None,1,None),
+       (1,16,"GtkWidget",1,1,None,None,None),
+       (1,16,"GtkWidget",2,2,None,1,None)
+  </object_data>
+  <object_data_arg>
+       (1,2,"GtkWidget",2,2,"name","_break-status-icon"),
+       (1,3,"GtkWidget",2,2,"name","_break-status-heading"),
+       (1,4,"GtkWidget",2,2,"name","_break-status-body"),
+       (1,6,"GtkWidget",2,2,"name","_break-status-icon"),
+       (1,7,"GtkWidget",2,2,"name","_break-status-heading"),
+       (1,8,"GtkWidget",2,2,"name","_break-status-body"),
+       (1,11,"GtkWidget",2,2,"name","_break-status-hint"),
+       (1,13,"GtkWidget",2,2,"name","_break-status-body"),
+       (1,14,"GtkWidget",2,2,"name","_break-status-body"),
+       (1,15,"GtkWidget",2,2,"name","_break-status-body"),
+       (1,16,"GtkWidget",2,2,"name","_break-status-heading")
+  </object_data_arg>
+</cambalache-project>
diff --git a/ui/settings.css b/ui/settings.css
new file mode 100644
index 0000000..8923f2c
--- /dev/null
+++ b/ui/settings.css
@@ -0,0 +1,25 @@
+._settings-title {
+    font-weight:bold;
+}
+
+._break-info {
+}
+
+._break-info-heading {
+    font-size: xx-large;
+}
+
+._break-status-heading {
+    font-size: larger;
+}
+
+._break-status-body {
+}
+
+._break-status-hint {
+    font-size: small;
+}
+
+._break-status-icon {
+    opacity: 0.2;
+}


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