[gnome-calculator/wip/cdavis/gtk4: 2/2] WIP: Port to GTK4+libadwaita




commit 61640ec455d862604329fa7b16af5847e43fc644
Author: Christopher Davis <christopherdavis gnome org>
Date:   Sat Oct 9 21:04:28 2021 -0700

    WIP: Port to GTK4+libadwaita
    
    TODO:
    * [ ] Fix financial mode dialogs
    * [ ] Look into button size difference
    * [ ] Basic buttons don't show when first starting the app
    * [ ] ComboRow preference fixes

 lib/math-equation.vala               |   14 +-
 meson.build                          |    6 +-
 org.gnome.Calculator.json            |   14 +-
 search-provider/search-provider.vala |    5 +-
 src/gnome-calculator.vala            |   74 +-
 src/math-buttons.vala                |   43 +-
 src/math-display.vala                |   45 +-
 src/math-function-popover.vala       |    2 +
 src/math-history.vala                |   17 +-
 src/math-popover.vala                |    7 +-
 src/math-preferences.vala            |   80 +-
 src/math-window.vala                 |   30 +-
 src/ui/buttons-advanced.ui           | 1840 ++++++++-----------
 src/ui/buttons-basic.ui              |  462 ++---
 src/ui/buttons-financial.ui          | 2800 ++++++++++++----------------
 src/ui/buttons-programming.ui        | 3366 ++++++++++++++--------------------
 src/ui/calculator.css                |   30 +-
 src/ui/history-entry.ui              |   86 +-
 src/ui/history-view.ui               |   47 +-
 src/ui/math-converter.ui             |   51 +-
 src/ui/math-function-popover.ui      |   37 +-
 src/ui/math-preferences.ui           |   50 +-
 src/ui/math-variable-popover.ui      |   27 +-
 src/ui/math-window.ui                |  104 +-
 24 files changed, 3817 insertions(+), 5420 deletions(-)
---
diff --git a/lib/math-equation.vala b/lib/math-equation.vala
index 8344ba28..9fa1fade 100644
--- a/lib/math-equation.vala
+++ b/lib/math-equation.vala
@@ -502,15 +502,23 @@ public class MathEquation : Gtk.SourceBuffer
         if (tsep_string == null || tsep_string == "")
             tsep_string = " ";
         text = text.replace (tsep_string, "");
-        Gtk.Clipboard.get (Gdk.Atom.NONE).set_text (text, -1);
+        Gdk.Clipboard clipboard = Gdk.Display.get_default ().get_clipboard ();
+        clipboard.set_text (text);
     }
 
     public void paste ()
     {
-        Gtk.Clipboard.get (Gdk.Atom.NONE).request_text (on_paste);
+        Gdk.Clipboard clipboard = Gdk.Display.get_default ().get_clipboard ();
+        clipboard.read_text_async.begin (null, (obj, res) => {
+            try {
+                on_paste (clipboard.read_text_async.end (res));
+            } catch (GLib.Error err) {
+                print (err.message);
+            }
+        });
     }
 
-    private void on_paste (Gtk.Clipboard clipboard, string? text)
+    private void on_paste (string? text)
     {
         if (text != null)
             /* Replaces '\n' characters by ' ' in text before pasting it. */
diff --git a/meson.build b/meson.build
index 588b2551..f86ca152 100644
--- a/meson.build
+++ b/meson.build
@@ -63,10 +63,10 @@ meson.add_install_script('meson_post_install.py')
 subdir('vapi')
 subdir('gcalc')
 if not get_option ('disable-ui')
-gtk = dependency('gtk+-3.0', version: '>= 3.24.1')
-libhandy = dependency('libhandy-1', version: '>= 1.0.0')
+gtk = dependency('gtk4', version: '>= 4.5.0')
+libhandy = dependency('libadwaita-1', version: '>= 1.0.0')
 subdir('gci')
-gtksourceview = dependency('gtksourceview-4', version: '>= 4.0.2')
+gtksourceview = dependency('gtksourceview-5', version: '>= 5.2.0')
 subdir('data')
 subdir('lib')
 subdir('src')
diff --git a/org.gnome.Calculator.json b/org.gnome.Calculator.json
index ff424feb..af60423f 100644
--- a/org.gnome.Calculator.json
+++ b/org.gnome.Calculator.json
@@ -12,7 +12,8 @@
         "--share=ipc",
         "--socket=fallback-x11",
         "--socket=wayland",
-        "--share=network"
+        "--share=network",
+        "--device=dri"
     ],
     "cleanup" : [
         "/include",
@@ -56,17 +57,6 @@
                 }
             ]
         },
-        {
-            "name" : "gtksourceview",
-            "buildsystem": "meson",
-            "sources" : [
-                {
-                    "type" : "git",
-                    "url" : "https://gitlab.gnome.org/GNOME/gtksourceview.git";,
-                    "branch" : "gtksourceview-4-8"
-                }
-            ]
-        },
         {
             "name" : "gee",
             "config-opts" : [
diff --git a/search-provider/search-provider.vala b/search-provider/search-provider.vala
index f37d24dc..3c1d0fd4 100644
--- a/search-provider/search-provider.vala
+++ b/search-provider/search-provider.vala
@@ -217,7 +217,8 @@ public class SearchProvider : Object
             if (yield solve_equation (equation))
             {
                 var equation_result = cached_equations.lookup (equation);
-                Gtk.Clipboard.get (Gdk.Atom.NONE).set_text (equation_result, -1);
+                Gdk.Clipboard clipboard = Gdk.Display.get_default ().get_clipboard ();
+                clipboard.set_text (equation_result);
             }
         }
         else
@@ -272,7 +273,7 @@ public class SearchProviderApp : Application
 
 int main (string[] args)
 {
-    Gtk.init(ref args);
+    Gtk.init();
     Intl.setlocale (LocaleCategory.ALL, "");
 
     return new SearchProviderApp ().run ();
diff --git a/src/gnome-calculator.vala b/src/gnome-calculator.vala
index befe3b73..3fcf0c20 100644
--- a/src/gnome-calculator.vala
+++ b/src/gnome-calculator.vala
@@ -13,7 +13,6 @@ public class Calculator : Gtk.Application
 {
     private Settings settings;
     private MathWindow last_opened_window;
-    int n_math_windows = 0;
     private MathPreferencesDialog preferences_dialog;
     private Gtk.ShortcutsWindow shortcuts_window;
     private static string program_name = null;
@@ -79,15 +78,6 @@ public class Calculator : Gtk.Application
 
         var current_window = new MathWindow (this, equation);
         current_window.set_title (_("Calculator"));
-        // when closing the last window save its position to the settings
-        current_window.delete_event.connect((sender, event) => {
-            if (n_math_windows == 1) {
-                save_window_position ((sender as MathWindow));
-            }
-            n_math_windows -= 1;
-            return false;
-        });
-        n_math_windows += 1;
 
         var buttons = current_window.buttons;
         buttons.programming_base = number_base;
@@ -116,13 +106,11 @@ public class Calculator : Gtk.Application
     {
         base.startup ();
 
-        Hdy.init ();
+        Adw.init ();
 
         settings = new Settings ("org.gnome.calculator");
         settings.delay ();
         last_opened_window = create_new_window (settings);
-        // restore the first window position from the settings
-        load_window_position (last_opened_window);
         CurrencyManager.get_default ().refresh_interval = settings.get_int ("refresh-interval");
         CurrencyManager.get_default ().refresh_async ();
 
@@ -293,35 +281,20 @@ public class Calculator : Gtk.Application
             }
 
             shortcuts_window = builder.get_object ("shortcuts-calculator") as Gtk.ShortcutsWindow;
-            shortcuts_window.destroy.connect ( (event) => { shortcuts_window = null; });
+            shortcuts_window.close_request.connect (() => {
+                shortcuts_window = null;
+                return false;
+            });
         }
 
         if (get_active_window () != shortcuts_window.get_transient_for ())
             shortcuts_window.set_transient_for (get_active_window ());
-        shortcuts_window.show_all ();
         shortcuts_window.present ();
     }
 
     private void help_cb ()
     {
-        try
-        {
-            Gtk.show_uri (get_active_window ().get_screen (), "help:gnome-calculator", Gdk.CURRENT_TIME);
-        }
-        catch (Error e)
-        {
-            /* Translators: Error message displayed when unable to launch help browser */
-            var message = _("Unable to open help file");
-
-            var d = new Gtk.MessageDialog (get_active_window (),
-                                           Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT,
-                                           Gtk.MessageType.ERROR,
-                                           Gtk.ButtonsType.CLOSE,
-                                           "%s", message);
-            d.format_secondary_text ("%s", e.message);
-            d.run ();
-            d.destroy ();
-        }
+        Gtk.show_uri (get_active_window (), "help:gnome-calculator", Gdk.CURRENT_TIME);
     }
 
     private void about_cb ()
@@ -366,8 +339,6 @@ public class Calculator : Gtk.Application
 
     private void quit_cb ()
     {
-        save_window_position (get_active_math_window ());
-
         if (get_windows ().length () > 1)
         {
             var dialog = new Gtk.MessageDialog.with_markup (get_active_math_window (), Gtk.DialogFlags.MODAL,
@@ -375,10 +346,13 @@ public class Calculator : Gtk.Application
                                                             _("Are you sure you want to close all open 
windows?"));
             dialog.add_buttons (_("Close _All"), Gtk.ResponseType.CLOSE);
 
-            int result = dialog.run ();
-            if (result == Gtk.ResponseType.CLOSE)
-                this.quit ();
-            dialog.destroy ();
+
+            dialog.response.connect ((result) => {
+                if (result == Gtk.ResponseType.CLOSE)
+                    this.quit ();
+            });
+
+            dialog.show ();
         } else {
             this.quit ();
         }
@@ -390,28 +364,6 @@ public class Calculator : Gtk.Application
         window.show ();
     }
 
-    /**
-     * Load `window-position` from the settings and move the window to that
-     * position
-     */
-    private void load_window_position (MathWindow window) {
-        int32 x, y;
-        settings.get("window-position", "(ii)", out x, out y);
-        // (-1, -1) is the default value
-        if (x != -1 && y != -1) {
-            window.move (x, y);
-        }
-    }
-
-    /**
-     * Save window position to the settings
-     */
-    private void save_window_position (MathWindow window) {
-        int32 x, y;
-        window.get_position (out x, out y);
-        settings.set_value("window-position", new Variant("(ii)", x, y));
-    }
-
     public static int main (string[] args)
     {
         Intl.setlocale (LocaleCategory.ALL, "");
diff --git a/src/math-buttons.vala b/src/math-buttons.vala
index 97d86f9d..f40939bb 100644
--- a/src/math-buttons.vala
+++ b/src/math-buttons.vala
@@ -55,9 +55,9 @@ public class MathButtons : Gtk.Box
             if (prog_view_more_button != null)
                 prog_view_more_button.active = false;
             if (adv_panel != null)
-                (adv_panel as Hdy.Leaflet).visible_child_name = "basic";
+                (adv_panel as Adw.Leaflet).visible_child_name = "basic";
             if (fin_panel != null)
-                (fin_panel as Hdy.Leaflet).visible_child_name = "basic";
+                (fin_panel as Adw.Leaflet).visible_child_name = "basic";
             if (prog_leaflet != null)
                 prog_leaflet.visible_child_name = "basic";
         }
@@ -77,12 +77,12 @@ public class MathButtons : Gtk.Box
     private Gtk.Widget prog_panel;
     private Gtk.Widget? active_panel = null;
 
-    private Hdy.Leaflet prog_leaflet;
+    private Adw.Leaflet prog_leaflet;
     private Gtk.ToggleButton prog_view_more_button;
 
     private Gtk.ComboBox base_combo;
     private Gtk.Label base_label;
-    private Gtk.Label word_size_label;
+    private Gtk.MenuButton word_size_button;
     private Gtk.Widget bit_panel;
     private List<Gtk.Button> toggle_bit_buttons;
 
@@ -221,7 +221,7 @@ public class MathButtons : Gtk.Box
     {
         equation.word_size = (param.get_int32 ());
         string format = ngettext("%d-bit", "%d-bit", param.get_int32 ());
-        word_size_label.set_label(format.printf(param.get_int32 ()));
+        word_size_button.set_label(format.printf(param.get_int32 ()));
     }
 
     private void on_insert_numeric_point (SimpleAction action, Variant? param)
@@ -312,10 +312,10 @@ public class MathButtons : Gtk.Box
             visible = false;
             break;
         case ButtonMode.ADVANCED:
-            visible = adv_panel != null && (adv_panel as Hdy.Leaflet).folded;
+            visible = adv_panel != null && (adv_panel as Adw.Leaflet).folded;
             break;
         case ButtonMode.FINANCIAL:
-            visible = fin_panel != null && (fin_panel as Hdy.Leaflet).folded;
+            visible = fin_panel != null && (fin_panel as Adw.Leaflet).folded;
             break;
         case ButtonMode.PROGRAMMING:
             visible = prog_leaflet != null && prog_leaflet.folded;
@@ -360,6 +360,8 @@ public class MathButtons : Gtk.Box
             break;
         }
 
+        builder.set_current_object (this);
+
         try
         {
             builder.add_from_resource ("/org/gnome/calculator/%s".printf(builder_resource));
@@ -370,7 +372,7 @@ public class MathButtons : Gtk.Box
         }
 
         var panel = builder.get_object ("button_panel") as Gtk.Widget;
-        pack_end (panel, true, true, 0);
+        append (panel);
 
         switch (mode)
         {
@@ -398,7 +400,7 @@ public class MathButtons : Gtk.Box
             break;
         case ButtonMode.PROGRAMMING:
             prog_panel = panel;
-            prog_leaflet = builder.get_object ("leaflet") as Hdy.Leaflet;
+            prog_leaflet = builder.get_object ("leaflet") as Adw.Leaflet;
 
             prog_view_more_button = builder.get_object ("view_more_button") as Gtk.ToggleButton;
             prog_view_more_button.bind_property ("active", prog_leaflet, "visible-child-name",
@@ -447,7 +449,7 @@ public class MathButtons : Gtk.Box
             base_label = builder.get_object ("base_label") as Gtk.Label;
             character_code_dialog = builder.get_object ("character_code_dialog") as Gtk.Dialog;
             character_code_dialog.response.connect (character_code_dialog_response_cb);
-            character_code_dialog.delete_event.connect (character_code_dialog_delete_cb);
+            character_code_dialog.close_request.connect (character_code_dialog_close_request);
             character_code_entry = builder.get_object ("character_code_entry") as Gtk.Entry;
             character_code_entry.activate.connect (character_code_dialog_activate_cb);
 
@@ -464,7 +466,7 @@ public class MathButtons : Gtk.Box
                 i++;
             }
             toggle_bit_buttons.reverse ();
-            word_size_label = builder.get_object ("word_size_label") as Gtk.Label;
+            word_size_button = builder.get_object ("calc_word_size_button") as Gtk.MenuButton;
             base_combo = builder.get_object ("base_combo") as Gtk.ComboBox;
             base_combo.changed.connect (base_combobox_changed_cb);
             equation.notify["number-base"].connect ((pspec) => { base_changed_cb (); } );
@@ -476,8 +478,6 @@ public class MathButtons : Gtk.Box
         if (mode == ButtonMode.FINANCIAL)
             load_finc_dialogs ();
 
-        builder.connect_signals (this);
-
         update_bit_panel ();
         update_view_more_visible ();
 
@@ -541,12 +541,12 @@ public class MathButtons : Gtk.Box
         {
             converter = new MathConverter (equation);
             converter.changed.connect (converter_changed_cb);
-            pack_start (converter, false, true, 0);
+            append (converter);
             converter.notify["view-more-active"].connect (() => {
                 if (adv_panel != null)
-                    (adv_panel as Hdy.Leaflet).visible_child_name = converter.view_more_active ? "advanced" 
: "basic";
+                    (adv_panel as Adw.Leaflet).visible_child_name = converter.view_more_active ? "advanced" 
: "basic";
                 if (fin_panel != null)
-                    (fin_panel as Hdy.Leaflet).visible_child_name = converter.view_more_active ? "advanced" 
: "basic";
+                    (fin_panel as Adw.Leaflet).visible_child_name = converter.view_more_active ? "advanced" 
: "basic";
             });
         }
 
@@ -616,7 +616,7 @@ public class MathButtons : Gtk.Box
     {
         var size = equation.word_size;
         string format = ngettext ("%d-bit", "%d-bit", size);
-        word_size_label.set_label (format.printf(size));
+        word_size_button.set_label (format.printf(size));
         update_bit_button_sensitivities ();
     }
 
@@ -644,8 +644,7 @@ public class MathButtons : Gtk.Box
     {
         var name = param.get_string ();
         var dialog = financial_ui.get_object (name) as Gtk.Dialog;
-        dialog.run ();
-        dialog.hide ();
+        dialog.show ();
     }
 
     private void on_insert_character (SimpleAction action, Variant? param)
@@ -658,8 +657,8 @@ public class MathButtons : Gtk.Box
         var next_entry = widget.get_data<Gtk.Entry> ("next-entry");
         if (next_entry == null)
         {
-            var dialog = widget.get_toplevel () as Gtk.Dialog;
-            if (dialog.is_toplevel ())
+            var dialog = widget.get_root () as Gtk.Dialog;
+            if (dialog != null)
             {
                 dialog.response (Gtk.ResponseType.OK);
                 return;
@@ -750,7 +749,7 @@ public class MathButtons : Gtk.Box
         character_code_dialog_response_cb (character_code_dialog, Gtk.ResponseType.OK);
     }
 
-    private bool character_code_dialog_delete_cb (Gtk.Widget dialog, Gdk.EventAny event)
+    private bool character_code_dialog_close_request (Gtk.Widget dialog)
     {
         character_code_dialog_response_cb (dialog, Gtk.ResponseType.CANCEL);
         return true;
diff --git a/src/math-display.vala b/src/math-display.vala
index d104e812..7f89f537 100644
--- a/src/math-display.vala
+++ b/src/math-display.vala
@@ -46,12 +46,10 @@ public class MathDisplay : Gtk.Box
         history.equation_clicked.connect ((eq) => { display_text (eq); });
         history.set_serializer (equation.serializer);
         _equation.display_changed.connect (history.set_serializer);
-        add (history);
-        show_all ();
+        append (history);
 
-        var scrolled_window = new Gtk.ScrolledWindow (null, null);
-        var style_context = scrolled_window.get_style_context ();
-        style_context.add_class ("display-scrolled");
+        var scrolled_window = new Gtk.ScrolledWindow ();
+        scrolled_window.add_css_class ("display-scrolled");
 
         scrolled_window.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.NEVER);
         source_view = new Gtk.SourceView.with_buffer (equation);
@@ -65,20 +63,18 @@ public class MathDisplay : Gtk.Box
 
         source_view.set_name ("displayitem");
         source_view.set_size_request (20, 20);
-        source_view.get_accessible ().set_role (Atk.Role.EDITBAR);
-        //FIXME:<property name="AtkObject::accessible-description" translatable="yes" comments="Accessible 
description for the area in which results are displayed">Result Region</property>
-        event_controller = new Gtk.EventControllerKey(source_view); //.key_press_event.connect 
(key_press_cb);
+        event_controller = new Gtk.EventControllerKey ();
         event_controller.key_pressed.connect (key_press_cb);
+        source_view.add_controller (event_controller);
         create_autocompletion ();
         completion_visible = false;
         completion_selected = false;
 
-        pack_start (scrolled_window, false, false, 0);
-        scrolled_window.add (source_view); /* Adds ScrolledWindow to source_view for displaying long 
equations */
-        scrolled_window.show ();
+        append (scrolled_window);
+        scrolled_window.set_child (source_view); /* Adds ScrolledWindow to source_view for displaying long 
equations */
 
         var info_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
-        pack_start (info_box, false, true, 0);
+        append (info_box);
 
         var info_view = new Gtk.TextView ();
         info_view.set_wrap_mode (Gtk.WrapMode.WORD);
@@ -86,18 +82,13 @@ public class MathDisplay : Gtk.Box
         info_view.set_editable (false);
         info_view.set_left_margin (12);
         info_view.set_right_margin (12);
-        info_box.pack_start (info_view, true, true, 0);
+        info_view.set_hexpand (true);
+        info_view.add_css_class ("info-view");
+        info_box.append (info_view);
         info_buffer = info_view.get_buffer ();
 
-        style_context = info_view.get_style_context ();
-        style_context.add_class ("info-view");
-
         spinner = new Gtk.Spinner ();
-        info_box.pack_end (spinner, false, false, 0);
-
-        info_box.show ();
-        info_view.show ();
-        source_view.show ();
+        info_box.append (spinner);
 
         equation.notify["status"].connect ((pspec) => { status_changed_cb (); });
         status_changed_cb ();
@@ -139,6 +130,7 @@ public class MathDisplay : Gtk.Box
 
     private void create_autocompletion ()
     {
+        /*
         Gtk.SourceCompletion completion = source_view.get_completion ();
         completion.show.connect ((completion) => { this.completion_visible = true; this.completion_selected 
= false;} );
         completion.hide.connect ((completion) => { this.completion_visible = false; this.completion_selected 
= false; } );
@@ -153,13 +145,14 @@ public class MathDisplay : Gtk.Box
         {
             warning ("Could not add CompletionProvider to source-view");
         }
+        */
     }
 
     private bool key_press_cb (Gtk.EventControllerKey controller, uint keyval, uint keycode, 
Gdk.ModifierType mod_state)
     {
         info ("event\n");
         /* Clear on escape */
-        var state = mod_state & (Gdk.ModifierType.CONTROL_MASK | Gdk.ModifierType.MOD1_MASK);
+        var state = mod_state & (Gdk.ModifierType.CONTROL_MASK | Gdk.ModifierType.ALT_MASK);
 
         if ((keyval == Gdk.Key.Escape && state == 0 && !completion_visible) ||
             (keyval == Gdk.Key.Delete && (mod_state & Gdk.ModifierType.CONTROL_MASK) == 
Gdk.ModifierType.CONTROL_MASK))
@@ -173,7 +166,7 @@ public class MathDisplay : Gtk.Box
             Gtk.SourceCompletion completion = source_view.get_completion ();
             completion.hide ();
             return true;
-        } else if (state == Gdk.ModifierType.MOD1_MASK && (keyval == Gdk.Key.Left || keyval == 
Gdk.Key.Right))
+        } else if (state == Gdk.ModifierType.ALT_MASK && (keyval == Gdk.Key.Left || keyval == Gdk.Key.Right))
         {
             switch (keyval)
             {
@@ -346,7 +339,7 @@ public class MathDisplay : Gtk.Box
                  return true;
             }
         }
-        if (state == Gdk.ModifierType.MOD1_MASK)
+        if (state == Gdk.ModifierType.ALT_MASK)
         {
             switch (keyval)
             {
@@ -407,7 +400,7 @@ public class MathDisplay : Gtk.Box
                 return true;
             }
         }
-        else if (state == Gdk.ModifierType.MOD1_MASK || equation.number_mode == NumberMode.SUBSCRIPT)
+        else if (state == Gdk.ModifierType.ALT_MASK || equation.number_mode == NumberMode.SUBSCRIPT)
         {
             if (!equation.has_selection)
                 equation.remove_trailing_spaces ();
@@ -496,6 +489,7 @@ public class MathDisplay : Gtk.Box
     }
 }
 
+/*
 public class CompletionProvider : GLib.Object, Gtk.SourceCompletionProvider
 {
     public virtual string get_name ()
@@ -656,3 +650,4 @@ public class VariableCompletionProvider : CompletionProvider
         context.add_proposals (this, proposals, true);
     }
 }
+*/
diff --git a/src/math-function-popover.vala b/src/math-function-popover.vala
index 98959996..b1b950b2 100644
--- a/src/math-function-popover.vala
+++ b/src/math-function-popover.vala
@@ -71,6 +71,7 @@ public class MathFunctionPopover : MathPopover<MathFunction>
         equation.place_cursor (end);
     }
 
+    /*
     [GtkCallback]
     private bool function_name_focus_cb (Gtk.Widget widget, Gtk.DirectionType direction)
     {
@@ -82,6 +83,7 @@ public class MathFunctionPopover : MathPopover<MathFunction>
 
         return false;
     }
+    */
 
     [GtkCallback]
     private void function_name_entry_changed_cb (Gtk.Editable editable)
diff --git a/src/math-history.vala b/src/math-history.vala
index 31627e71..ca6969a5 100644
--- a/src/math-history.vala
+++ b/src/math-history.vala
@@ -9,7 +9,7 @@
 */
 
 [GtkTemplate (ui = "/org/gnome/calculator/history-view.ui")]
-public class HistoryView : Gtk.ScrolledWindow
+public class HistoryView : Adw.Bin
 {
     string? last_equation = null;
 
@@ -68,13 +68,18 @@ public class HistoryView : Gtk.ScrolledWindow
     {
         _rows = 0;
         _current = 0;
-        listbox.foreach ((child) => { listbox.remove(child); });
+        for (Gtk.Widget? child = listbox.get_row_at_index (0); child != null; child = 
listbox.get_row_at_index (0)) {
+            listbox.remove (child);
+        }
     }
 
     public void set_serializer (Serializer serializer)
     {
         this.serializer = serializer;
-        listbox.foreach ((child) => { ((HistoryEntry)child).redisplay (serializer); });
+        for (int i = 0; i < _rows; i++) {
+            HistoryEntry child = listbox.get_row_at_index (i) as HistoryEntry;
+            child.redisplay (serializer);
+        }
     }
 }
 
@@ -109,21 +114,19 @@ public class HistoryEntry : Gtk.ListBoxRow
     }
 
     [GtkCallback]
-    public bool answer_clicked_cb (Gtk.Widget widget, Gdk.EventButton eventbutton)
+    public void answer_clicked_cb (Gtk.GestureClick gesture, int n_press, double x, double y)
     {
         var answer = answer_label.get_text ();
         if (answer != null)
             answer_clicked (answer);
-        return true;
     }
 
     [GtkCallback]
-    private bool equation_clicked_cb (Gtk.Widget widget, Gdk.EventButton eventbutton)
+    private void equation_clicked_cb (Gtk.GestureClick gesture, int n_press, double x, double y)
     {
         var equation = equation_label.get_text ();
         if (equation != null)
             equation_clicked (equation);
-        return true;
     }
 }
 
diff --git a/src/math-popover.vala b/src/math-popover.vala
index aba349c1..dd69672f 100644
--- a/src/math-popover.vala
+++ b/src/math-popover.vala
@@ -58,7 +58,7 @@ public abstract class MathPopover<T> : Gtk.Popover
         label.set_margin_start (6);
         label.set_use_markup (true);
         label.halign = Gtk.Align.START;
-        hbox.pack_start (label, true, true, 0);
+        hbox.append (label);
 
         if (is_editable (item))
         {
@@ -66,7 +66,7 @@ public abstract class MathPopover<T> : Gtk.Popover
             button.get_style_context ().add_class ("flat");
             button.set_data<Object> ("object", item as Object);
             button.clicked.connect (save_function_cb);
-            hbox.pack_start (button, false, true, 0);
+            hbox.append (button);
         }
         if (is_deletable (item))
         {
@@ -74,9 +74,8 @@ public abstract class MathPopover<T> : Gtk.Popover
             button.get_style_context ().add_class ("flat");
             button.set_data<Object> ("object", item as Object);
             button.clicked.connect (delete_function_cb);
-            hbox.pack_start (button, false, true, 0);
+            hbox.append (button);
         }
-        hbox.show_all ();
         return hbox;
     }
 
diff --git a/src/math-preferences.vala b/src/math-preferences.vala
index aab233bc..6c75b70e 100644
--- a/src/math-preferences.vala
+++ b/src/math-preferences.vala
@@ -8,19 +8,13 @@
  * license.
  */
 [GtkTemplate (ui = "/org/gnome/calculator/math-preferences.ui")]
-public class MathPreferencesDialog : Hdy.PreferencesWindow
+public class MathPreferencesDialog : Adw.PreferencesWindow
 {
     private struct ComboEntry {
         string name;
         uint val;
     }
 
-    private ComboEntry[] entries_angle_units = {
-        { _("Radians"), 0 },
-        { _("Degrees"), 1 },
-        { _("Gradians"), 2 }
-    };
-
     private ComboEntry[] entries_word_size = {
         // Translators: Word size combo: 8 bit
         { _("8-bit"), 8 },
@@ -32,6 +26,13 @@ public class MathPreferencesDialog : Hdy.PreferencesWindow
         { _("64-bit"), 64 }
     };
 
+    public enum WordSize {
+        8_BIT = 8,
+        16_BIT = 16,
+        32_BIT = 32,
+        64_BIT = 64,
+    }
+
     private ComboEntry[] entries_refresh_interval = {
         // Translators: Refresh interval combo: never
         { _("never"), 0 },
@@ -41,14 +42,20 @@ public class MathPreferencesDialog : Hdy.PreferencesWindow
         { _("weekly"), 604800 }
     };
 
+    public enum RefreshInterval {
+        NEVER = 0,
+        DAILY = 86400,
+        WEEKLY = 604800,
+    }
+
     public MathEquation equation { private get; construct; }
 
     [GtkChild]
-    private unowned Hdy.ComboRow row_angle_units;
+    private unowned Adw.ComboRow row_angle_units;
     [GtkChild]
-    private unowned Hdy.ComboRow row_word_size;
+    private unowned Adw.ComboRow row_word_size;
     [GtkChild]
-    private unowned Hdy.ComboRow row_refresh_interval;
+    private unowned Adw.ComboRow row_refresh_interval;
     [GtkChild]
     private unowned Gtk.SpinButton spinbutton_decimals;
     [GtkChild]
@@ -67,10 +74,6 @@ public class MathPreferencesDialog : Hdy.PreferencesWindow
     {
         settings = new Settings ("org.gnome.calculator");
 
-        populate_combo_row (row_angle_units, entries_angle_units);
-        populate_combo_row (row_word_size, entries_word_size);
-        populate_combo_row (row_refresh_interval, entries_refresh_interval);
-
         spinbutton_decimals.value_changed.connect (() => { equation.accuracy = 
spinbutton_decimals.get_value_as_int (); });
         switch_trailing_zeroes.state_set.connect ((state) => { equation.show_trailing_zeroes = state; return 
false; });
         switch_thousands_separators.state_set.connect ((state) => { equation.show_thousands_separators = 
state; return false; });
@@ -87,58 +90,58 @@ public class MathPreferencesDialog : Hdy.PreferencesWindow
         switch_trailing_zeroes.set_active (equation.show_trailing_zeroes);
         equation.notify["show-trailing_zeroes"].connect (() => { switch_trailing_zeroes.set_active 
(equation.show_trailing_zeroes); });
 
-        set_combo_row_from_int (row_word_size, entries_word_size, equation.word_size);
-        equation.notify["word-size"].connect ((pspec) => { set_combo_row_from_int (row_word_size, 
entries_word_size, equation.word_size); });
+        // set_combo_row_from_int (row_word_size, entries_word_size, equation.word_size);
+        // equation.notify["word-size"].connect ((pspec) => { set_combo_row_from_int (row_word_size, 
entries_word_size, equation.word_size); });
 
-        set_combo_row_from_int (row_angle_units, entries_angle_units, equation.angle_units);
-        equation.notify["angle-units"].connect ((pspec) => { set_combo_row_from_int (row_angle_units, 
entries_angle_units, equation.angle_units); });
+        // set_combo_row_from_int (row_angle_units, entries_angle_units, equation.angle_units);
+        // equation.notify["angle-units"].connect ((pspec) => { set_combo_row_from_int (row_angle_units, 
entries_angle_units, equation.angle_units); });
 
-        set_combo_row_from_int (row_refresh_interval, entries_refresh_interval, settings.get_int 
("refresh-interval"));
+        // set_combo_row_from_int (row_refresh_interval, entries_refresh_interval, settings.get_int 
("refresh-interval"));
     }
 
-    private void populate_combo_row (Hdy.ComboRow row, ComboEntry[] entries) {
-        var list_store = new ListStore (typeof (Hdy.ValueObject));
-
-        foreach (var e in entries) {
-            var val = Value (typeof (string));
-            val.set_string (e.name);
-
-            var value_object = new Hdy.ValueObject (val);
-            value_object.set_data ("value", e.val.to_pointer ());
-            list_store.append (value_object);
+    /*
+    [GtkCallback]
+    private string? angle_units_name (Adw.EnumListItem item) {
+        switch (item.value) {
+            case AngleUnit.DEGREES:
+                return _("Degrees");
+            case AngleUnit.RADIANS:
+                return _("Radians");
+            case AngleUnit.GRADIANS:
+                return _("Gradians");
+            default:
+                return null;
         }
-
-        row.bind_name_model (list_store, (o) => {
-            return (o is Hdy.ValueObject) ? ((Hdy.ValueObject) o).dup_string () : null;
-        });
     }
+    */
 
     private void row_angle_units_changed_cb ()
     {
-        AngleUnit value = (AngleUnit) entries_angle_units[row_angle_units.selected_index].val;
+        AngleUnit value = (AngleUnit) row_angle_units.selected_item;
         equation.angle_units = value;
     }
 
     private void row_word_size_changed_cb ()
     {
-        int value = (int) entries_word_size[row_word_size.selected_index].val;
+        int value = (int) ((WordSize) row_word_size.selected_item);
         equation.word_size = value;
     }
 
     private void row_refresh_interval_changed_cb ()
     {
-        int value = (int) entries_refresh_interval[row_refresh_interval.selected_index].val;
+        int value = (int) ((RefreshInterval) row_refresh_interval.selected_item);
         settings.set_int ("refresh-interval", value);
         CurrencyManager.get_default ().refresh_interval = value;
     }
 
-    protected override bool delete_event (Gdk.EventAny event)
+    protected override bool close_request ()
     {
         hide ();
         return true;
     }
 
-    private void set_combo_row_from_int (Hdy.ComboRow row, ComboEntry[] entries, int value)
+    /*
+    private void set_combo_row_from_int (Adw.ComboRow row, ComboEntry[] entries, int value)
     {
         for (int i = 0; i < entries.length; i++) {
             if (entries[i].val == value) {
@@ -147,4 +150,5 @@ public class MathPreferencesDialog : Hdy.PreferencesWindow
             }
         }
     }
+    */
 }
diff --git a/src/math-window.vala b/src/math-window.vala
index 28c8198c..4fa1b102 100644
--- a/src/math-window.vala
+++ b/src/math-window.vala
@@ -10,7 +10,7 @@
  */
 
 [GtkTemplate (ui = "/org/gnome/calculator/math-window.ui")]
-public class MathWindow : Hdy.ApplicationWindow
+public class MathWindow : Adw.ApplicationWindow
 {
     private MathEquation _equation;
     public MathEquation equation { get { return _equation; } }
@@ -25,8 +25,6 @@ public class MathWindow : Hdy.ApplicationWindow
     [GtkChild]
     private unowned Gtk.MenuButton menu_button;
     [GtkChild]
-    private unowned Gtk.Label mode_label;
-    [GtkChild]
     private unowned Gtk.Grid grid;
     [GtkChild]
     private unowned MathConverter converter;
@@ -58,8 +56,8 @@ public class MathWindow : Hdy.ApplicationWindow
         converter.set_category (null);
         converter.set_conversion (equation.source_units, equation.target_units);
 
-        event_controller = new Gtk.EventControllerKey (this as Gtk.Widget);
-        // (this as Gtk.Widget).add_controller (event_controller);
+        event_controller = new Gtk.EventControllerKey ();
+        (this as Gtk.Widget).add_controller (event_controller);
         event_controller.key_pressed.connect (key_press_cb);
 
         _display = new MathDisplay (equation);
@@ -77,7 +75,7 @@ public class MathWindow : Hdy.ApplicationWindow
 
         var provider = new Gtk.CssProvider ();
         provider.load_from_resource ("/org/gnome/calculator/calculator.css");
-        Gtk.StyleContext.add_provider_for_screen (get_screen (), provider, 
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+        Gtk.StyleContext.add_provider_for_display (display, provider, 
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
     }
 
     private void clear_cb ()
@@ -93,27 +91,27 @@ public class MathWindow : Hdy.ApplicationWindow
         {
         default:
         case ButtonMode.BASIC:
-            mode_label.label = _("Basic");
+            menu_button.label = _("Basic");
             action.set_state (new Variant.string ("basic"));
             break;
 
         case ButtonMode.ADVANCED:
-            mode_label.label = _("Advanced");
+            menu_button.label = _("Advanced");
             action.set_state (new Variant.string ("advanced"));
             break;
 
         case ButtonMode.FINANCIAL:
-            mode_label.label = _("Financial");
+            menu_button.label = _("Financial");
             action.set_state (new Variant.string ("financial"));
             break;
 
         case ButtonMode.PROGRAMMING:
-            mode_label.label = _("Programming");
+            menu_button.label = _("Programming");
             action.set_state (new Variant.string ("programming"));
             break;
 
         case ButtonMode.KEYBOARD:
-            mode_label.label = _("Keyboard");
+            menu_button.label = _("Keyboard");
             action.set_state (new Variant.string ("keyboard"));
             break;
         }
@@ -143,9 +141,11 @@ public class MathWindow : Hdy.ApplicationWindow
         dialog.format_secondary_text ("%s", contents);
         dialog.add_buttons (_("_Quit"), Gtk.ResponseType.ACCEPT);
 
-        dialog.run ();
+        dialog.response.connect (() => {
+            destroy ();
+        });
 
-        destroy ();
+        dialog.show ();
     }
 
     protected bool key_press_cb (Gtk.EventControllerKey controller, uint keyval, uint keycode, 
Gdk.ModifierType state)
@@ -215,9 +215,7 @@ public class MathWindow : Hdy.ApplicationWindow
         requires (parameter != null)
         requires (parameter.is_of_type (VariantType.STRING))
     {
-        var popover = menu_button.get_popover ();
-        popover.hide ();
-        menu_button.set_active (false);
+        menu_button.popdown ();
 
         _display.grab_focus ();
 
diff --git a/src/ui/buttons-advanced.ui b/src/ui/buttons-advanced.ui
index e83d4c4d..46d5bd51 100644
--- a/src/ui/buttons-advanced.ui
+++ b/src/ui/buttons-advanced.ui
@@ -1,9 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-naming-policy toplevel-contextual -->
-  <requires lib="gtk+" version="3.16"/>
-  <object class="HdyLeaflet" id="button_panel">
-    <property name="visible">True</property>
+  <requires lib="gtk" version="4.0"/>
+  <object class="AdwLeaflet" id="button_panel">
     <property name="can-swipe-back">True</property>
     <property name="can-swipe-forward">True</property>
     <property name="transition-type">slide</property>
@@ -12,1139 +10,871 @@
       <class name="math-buttons"/>
     </style>
     <child>
-      <object class="GtkGrid" id="basic">
-        <property name="visible">True</property>
-        <property name="hexpand">true</property>
-        <property name="row-homogeneous">True</property>
-        <property name="column-homogeneous">True</property>
-        <property name="row_spacing">4</property>
-        <property name="column_spacing">4</property>
-        <child>
-          <object class="GtkButton" id="calc_4_button">
-            <property name="label">4</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">4</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_7_button">
-            <property name="label">7</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">7</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="top_attach">1</property>
-            <property name="left_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_8_button">
-            <property name="label">8</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">8</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_9_button">
-            <property name="label">9</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">9</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_5_button">
-            <property name="label">5</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">5</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_6_button">
-            <property name="label">6</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">6</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_modulus_divide_button">
-            <property name="label">mod</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Modulus divide</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">' mod '</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_divide_button">
-            <property name="label">÷</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Divide [/]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'÷'</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_1_button">
-            <property name="label">1</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">1</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="top_attach">3</property>
-            <property name="left_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_2_button">
-            <property name="label">2</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">2</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_0_button">
-            <property name="label">0</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">0</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="top_attach">4</property>
-            <property name="left_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_numeric_point_button">
-            <property name="label" comments="Label is set in gtk.c to comply with LC flags">.</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-numeric-point</property>
-            <style>
-              <class name="numeric-point-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_3_button">
-            <property name="label">3</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">3</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_multiply_button">
-            <property name="label">×</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Multiply [*]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'×'</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_subtract_button">
-            <property name="label">−</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Subtract [-]</property>
-            <property name="action_name">cal.subtract</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_add_button">
-            <property name="label">+</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Add [+]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'+'</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_pi_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Pi [Ctrl+P]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'π'</property>
+      <object class="AdwLeafletPage">
+        <property name="name">basic</property>
+        <property name="child">
+          <object class="GtkGrid" id="basic">
+            <property name="hexpand">True</property>
+            <property name="row-homogeneous">True</property>
+            <property name="column-homogeneous">True</property>
+            <property name="row_spacing">4</property>
+            <property name="column_spacing">4</property>
             <child>
-              <object class="GtkLabel" id="pi_label">
-                <property name="visible">True</property>
-                <property name="label">π</property>
-                <property name="use_markup">True</property>
+              <object class="GtkButton" id="calc_4_button">
+                <property name="label">4</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">4</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="row">2</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_root_button">
-            <property name="label">√</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Root [Ctrl+R]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'√'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_x_squared_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Square [Ctrl+2]</property>
-            <property name="action_name">cal.square</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_x_squared_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the exponentiation (x to the power of y) button">Exponent</property>
+            <child>
+              <object class="GtkButton" id="calc_7_button">
+                <property name="label">7</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">7</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="row">1</property>
+                  <property name="column">0</property>
+                </layout>
               </object>
             </child>
             <child>
-              <object class="GtkLabel" id="x_squared_label">
-                <property name="visible">True</property>
-                <property 
name="label">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;&lt;i&gt;2&lt;/i&gt;&lt;/sup&gt;</property>
-                <property name="use_markup">True</property>
+              <object class="GtkButton" id="calc_8_button">
+                <property name="label">8</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">8</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_clear_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Clear Display [Escape]</property>
-            <property name="action_name">cal.clear</property>
             <child>
-              <object class="GtkImage" id="calc_clear_icon">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="icon_name">edit-clear-symbolic</property>
+              <object class="GtkButton" id="calc_9_button">
+                <property name="label">9</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">9</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="destructive-action"/>
-              <class name="image-button"/>
-              <class name="clear-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_start_group_button">
-            <property name="label">(</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Start Group [(]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'('</property>
-            <style>
-              <class name="parenthesis-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_end_group_button">
-            <property name="label">)</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">End Group [)]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">')'</property>
-            <style>
-              <class name="parenthesis-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_percentage_button">
-            <property name="label">%</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Percentage [%]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'%'</property>
-            <style>
-              <class name="procent-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_result_button">
-            <property name="label" translatable="yes" comments="Label on the solve button (clicking this 
solves the displayed calculation)">=</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Calculate Result</property>
-            <property name="action_name">cal.solve</property>
-            <style>
-              <class name="suggested-action"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">3</property>
-            <property name="height">2</property>
-          </packing>
-        </child>
-      </object>
-      <packing>
-        <property name="name">basic</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkGrid" id="advanced">
-        <property name="visible">True</property>
-        <property name="hexpand">true</property>
-        <property name="row-homogeneous">True</property>
-        <property name="column-homogeneous">True</property>
-        <property name="row_spacing">4</property>
-        <property name="column_spacing">4</property>
-        <child>
-          <object class="GtkToggleButton" id="calc_subscript_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Subscript mode [Alt]</property>
-            <property name="action_name">cal.set-number-mode</property>
-            <property name="action_target">'subscript'</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_subscript_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the subscript mode button">Subscript</property>
+            <child>
+              <object class="GtkButton" id="calc_5_button">
+                <property name="label">5</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">5</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
             </child>
             <child>
-              <object class="GtkLabel" id="label4">
-                <property name="visible">True</property>
-                <property name="label">↓n</property>
-                <property name="use_markup">True</property>
+              <object class="GtkButton" id="calc_6_button">
+                <property name="label">6</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">6</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkToggleButton" id="calc_superscript_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Superscript mode [Ctrl]</property>
-            <property name="action_name">cal.set-number-mode</property>
-            <property name="action_target">'superscript'</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_superscript_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the superscript mode button">Superscript</property>
+            <child>
+              <object class="GtkButton" id="calc_modulus_divide_button">
+                <property name="label">mod</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Modulus divide</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos; mod &apos;</property>
+                <style>
+                  <class name="operator-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">0</property>
+                </layout>
               </object>
             </child>
             <child>
-              <object class="GtkLabel" id="label3">
-                <property name="visible">True</property>
-                <property name="label">↑n</property>
-                <property name="use_markup">True</property>
+              <object class="GtkButton" id="calc_divide_button">
+                <property name="label">÷</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Divide [/]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;÷&apos;</property>
+                <style>
+                  <class name="operator-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_factor_button">
-            <property name="label">a×b</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Factorize [Ctrl+F]</property>
-            <property name="action_name">cal.factorize</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_factor_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the factorize button">Factorize</property>
+            <child>
+              <object class="GtkButton" id="calc_1_button">
+                <property name="label">1</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">1</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="row">3</property>
+                  <property name="column">0</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_exponential_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Scientific exponent [Ctrl+E]</property>
-            <property name="action_name">cal.insert-exponent</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_exponential_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the scientific exponent button">Scientific Exponent</property>
+            <child>
+              <object class="GtkButton" id="calc_2_button">
+                <property name="label">2</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">2</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
             </child>
             <child>
-              <object class="GtkLabel" id="label2">
-                <property name="visible">True</property>
-                <property name="label">×10&lt;sup&gt;&lt;i&gt;y&lt;/i&gt;&lt;/sup&gt;</property>
-                <property name="use_markup">True</property>
+              <object class="GtkButton" id="calc_0_button">
+                <property name="label">0</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">0</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="row">4</property>
+                  <property name="column">0</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_cosine_button">
-            <property name="label">cos</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Cosine</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'cos '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_sine_button">
-            <property name="label">sin</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Sine</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'sin '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_tangent_button">
-            <property name="label">tan</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Tangent</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'tan '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_hyperbolic_cosine_button">
-            <property name="label">cosh</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Hyperbolic Cosine</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'cosh '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_hyperbolic_sine_button">
-            <property name="label">sinh</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Hyperbolic Sine</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'sinh '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_hyperbolic_tangent_button">
-            <property name="label">tanh</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Hyperbolic Tangent</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'tanh '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_x_pow_y_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Exponent [^ or **]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'^'</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_x_pow_y_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the exponentiation (x to the power of y) button">Exponent</property>
+            <child>
+              <object class="GtkButton" id="calc_numeric_point_button">
+                <property name="label" comments="Label is set in gtk.c to comply with LC flags">.</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-numeric-point</property>
+                <style>
+                  <class name="numeric-point-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">4</property>
+                </layout>
               </object>
             </child>
             <child>
-              <object class="GtkLabel" id="x_pow_y_label">
-                <property name="visible">True</property>
-                <property 
name="label">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;&lt;i&gt;y&lt;/i&gt;&lt;/sup&gt;</property>
-                <property name="use_markup">True</property>
+              <object class="GtkButton" id="calc_3_button">
+                <property name="label">3</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">3</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_inverse_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Inverse [Ctrl+I]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'⁻¹'</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_inverse_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the inverse button">Inverse</property>
+            <child>
+              <object class="GtkButton" id="calc_multiply_button">
+                <property name="label">×</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Multiply [*]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;×&apos;</property>
+                <style>
+                  <class name="operator-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
             </child>
             <child>
-              <object class="GtkLabel" id="label20">
-                <property name="visible">True</property>
-                <property name="label">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;−1&lt;/sup&gt;</property>
-                <property name="use_markup">True</property>
-                <property name="justify">center</property>
+              <object class="GtkButton" id="calc_subtract_button">
+                <property name="label">−</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Subtract [-]</property>
+                <property name="action_name">cal.subtract</property>
+                <style>
+                  <class name="operator-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_eulers_number_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Euler’s Number</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'e'</property>
             <child>
-              <object class="GtkLabel" id="eulers_number_label">
-                <property name="visible">True</property>
-                <property name="label">&lt;i&gt;e&lt;/i&gt;</property>
-                <property name="use_markup">True</property>
+              <object class="GtkButton" id="calc_add_button">
+                <property name="label">+</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Add [+]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;+&apos;</property>
+                <style>
+                  <class name="operator-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">4</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_natural_logarithm_button">
-            <property name="label">ln</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Natural Logarithm</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'ln '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_logarithm_button">
-            <property name="label">log</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Logarithm</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'log '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_factorial_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Factorial [!]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'!'</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_factorial_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the factorial button">Factorial</property>
+            <child>
+              <object class="GtkButton" id="calc_pi_button">
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Pi [Ctrl+P]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;π&apos;</property>
+                <child>
+                  <object class="GtkLabel" id="pi_label">
+                    <property name="label">π</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">0</property>
+                </layout>
               </object>
             </child>
             <child>
-              <object class="GtkLabel" id="label14">
-                <property name="visible">True</property>
-                <property name="label">&lt;i&gt;x&lt;/i&gt;!</property>
-                <property name="use_markup">True</property>
+              <object class="GtkButton" id="calc_root_button">
+                <property name="label">√</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Root [Ctrl+R]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;√&apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_abs_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Absolute Value [|]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'|'</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_abs_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the absolute value button">Absolute Value</property>
+            <child>
+              <object class="GtkButton" id="calc_x_squared_button">
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Square [Ctrl+2]</property>
+                <property name="action_name">cal.square</property>
+                <child>
+                  <object class="GtkLabel" id="x_squared_label">
+                    <property 
name="label">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;&lt;i&gt;2&lt;/i&gt;&lt;/sup&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
             </child>
             <child>
-              <object class="GtkLabel" id="label1">
-                <property name="visible">True</property>
-                <property name="label">|&lt;i&gt;x&lt;/i&gt;|</property>
-                <property name="use_markup">True</property>
+              <object class="GtkButton" id="calc_clear_button">
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Clear Display [Escape]</property>
+                <property name="action_name">cal.clear</property>
+                <property name="icon_name">edit-clear-symbolic</property>
+                <style>
+                  <class name="destructive-action"/>
+                  <class name="clear-button"/>
+                </style>
+                <layout>
+                  <property name="column">0</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_imaginary_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'i'</property>
             <child>
-              <object class="GtkLabel" id="imaginary_label">
-                <property name="visible">True</property>
-                <property name="label">&lt;i&gt;i&lt;/i&gt;</property>
-                <property name="use_markup">True</property>
+              <object class="GtkButton" id="calc_start_group_button">
+                <property name="label">(</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Start Group [(]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;(&apos;</property>
+                <style>
+                  <class name="parenthesis-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">0</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_end_group_button">
+                <property name="label">)</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">End Group [)]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;)&apos;</property>
+                <style>
+                  <class name="parenthesis-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">0</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_percentage_button">
+                <property name="label">%</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Percentage [%]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;%&apos;</property>
+                <style>
+                  <class name="procent-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">4</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_result_button">
+                <property name="label" translatable="1" comments="Label on the solve button (clicking this 
solves the displayed calculation)">=</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Calculate Result</property>
+                <property name="action_name">cal.solve</property>
+                <style>
+                  <class name="suggested-action"/>
+                </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">3</property>
+                  <property name="row-span">2</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_real_portion_button">
-            <property name="label">Re</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Real Component</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'Re '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_imaginary_portion_button">
-            <property name="label">Im</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Imaginary Component</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'Im '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_conjugate_button">
-            <property name="label">conj</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Complex conjugate</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'conj '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_arg_button">
-            <property name="label">Arg</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Complex argument</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'Arg '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
           </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkMenuButton" id="calc_memory_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Memory</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_memory_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the memory button">Memory</property>
+        </property>
+      </object>
+    </child>
+    <child>
+      <object class="AdwLeafletPage">
+        <property name="name">advanced</property>
+        <property name="child">
+          <object class="GtkGrid" id="advanced">
+            <property name="hexpand">True</property>
+            <property name="row-homogeneous">True</property>
+            <property name="column-homogeneous">True</property>
+            <property name="row_spacing">4</property>
+            <property name="column_spacing">4</property>
+            <child>
+              <object class="GtkToggleButton" id="calc_subscript_button">
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Subscript mode [Alt]</property>
+                <property name="action_name">cal.set-number-mode</property>
+                <property name="action_target">&apos;subscript&apos;</property>
+                <child>
+                  <object class="GtkLabel" id="label4">
+                    <property name="label">↓n</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">0</property>
+                </layout>
               </object>
             </child>
             <child>
-              <object class="GtkBox" id="hbox20">
-                <property name="orientation">horizontal</property>
-                <property name="visible">True</property>
+              <object class="GtkToggleButton" id="calc_superscript_button">
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Superscript mode [Ctrl]</property>
+                <property name="action_name">cal.set-number-mode</property>
+                <property name="action_target">&apos;superscript&apos;</property>
                 <child>
-                  <object class="GtkLabel" id="label23">
-                    <property name="visible">True</property>
-                    <property name="hexpand">true</property>
-                    <property name="label" translatable="yes" comments="The label on the memory 
button">x</property>
-                    <attributes>
-                      <attribute name="style" value="italic"/>
-                    </attributes>
+                  <object class="GtkLabel" id="label3">
+                    <property name="label">↑n</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
                 </child>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">0</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_factor_button">
+                <property name="label">a×b</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Factorize [Ctrl+F]</property>
+                <property name="action_name">cal.factorize</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">1</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_exponential_button">
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Scientific exponent [Ctrl+E]</property>
+                <property name="action_name">cal.insert-exponent</property>
                 <child>
-                  <object class="GtkArrow" id="arrow14">
-                    <property name="visible">True</property>
-                    <property name="arrow_type">down</property>
+                  <object class="GtkLabel" id="label2">
+                    <property name="label">×10&lt;sup&gt;&lt;i&gt;y&lt;/i&gt;&lt;/sup&gt;</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">1</property>
-                  </packing>
                 </child>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">4</property>
-            <property name="width">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkMenuButton" id="calc_function_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Additional Functions</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_function_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the store value button">Store</property>
+            <child>
+              <object class="GtkButton" id="calc_cosine_button">
+                <property name="label">cos</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Cosine</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;cos &apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">0</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_sine_button">
+                <property name="label">sin</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Sine</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;sin &apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">0</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_tangent_button">
+                <property name="label">tan</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Tangent</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;tan &apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">0</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_hyperbolic_cosine_button">
+                <property name="label">cosh</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Hyperbolic Cosine</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;cosh &apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">1</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_hyperbolic_sine_button">
+                <property name="label">sinh</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Hyperbolic Sine</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;sinh &apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">1</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_hyperbolic_tangent_button">
+                <property name="label">tanh</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Hyperbolic Tangent</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;tanh &apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">1</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_x_pow_y_button">
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Exponent [^ or **]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;^&apos;</property>
+                <child>
+                  <object class="GtkLabel" id="x_pow_y_label">
+                    <property 
name="label">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;&lt;i&gt;y&lt;/i&gt;&lt;/sup&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
             </child>
             <child>
-              <object class="GtkBox" id="hbox2">
-                <property name="visible">True</property>
-                <property name="orientation">horizontal</property>
+              <object class="GtkButton" id="calc_inverse_button">
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Inverse [Ctrl+I]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;⁻¹&apos;</property>
                 <child>
-                  <object class="GtkLabel" id="label5">
-                    <property name="hexpand">true</property>
-                    <property name="visible">True</property>
-                    <property name="label">f(x)</property>
+                  <object class="GtkLabel" id="label20">
+                    <property name="label">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;−1&lt;/sup&gt;</property>
+                    <property name="use_markup">True</property>
+                    <property name="justify">2</property>
                   </object>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
                 </child>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_eulers_number_button">
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Euler’s Number</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;e&apos;</property>
                 <child>
-                  <object class="GtkArrow" id="arrow1">
-                    <property name="visible">True</property>
-                    <property name="arrow_type">down</property>
+                  <object class="GtkLabel" id="eulers_number_label">
+                    <property name="label">&lt;i&gt;e&lt;/i&gt;</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">1</property>
-                  </packing>
                 </child>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">2</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_natural_logarithm_button">
+                <property name="label">ln</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Natural Logarithm</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;ln &apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">2</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_logarithm_button">
+                <property name="label">log</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Logarithm</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;log &apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">2</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_factorial_button">
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Factorial [!]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;!&apos;</property>
+                <child>
+                  <object class="GtkLabel" id="label14">
+                    <property name="label">&lt;i&gt;x&lt;/i&gt;!</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">3</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_abs_button">
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Absolute Value [|]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;|&apos;</property>
+                <child>
+                  <object class="GtkLabel" id="label1">
+                    <property name="label">|&lt;i&gt;x&lt;/i&gt;|</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_imaginary_button">
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;i&apos;</property>
+                <child>
+                  <object class="GtkLabel" id="imaginary_label">
+                    <property name="label">&lt;i&gt;i&lt;/i&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">3</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_real_portion_button">
+                <property name="label">Re</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Real Component</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;Re &apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">3</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_imaginary_portion_button">
+                <property name="label">Im</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Imaginary Component</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;Im &apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">3</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_conjugate_button">
+                <property name="label">conj</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Complex conjugate</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;conj &apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">4</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_arg_button">
+                <property name="label">Arg</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Complex argument</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;Arg &apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">4</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkMenuButton" id="calc_memory_button">
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="yes">Memory</property>
+                <property name="label" translatable="1" comments="The label on the memory 
button">x</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">4</property>
+                  <property name="column-span">2</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkMenuButton" id="calc_function_button">
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Additional Functions</property>
+                <property name="label">f(x)</property>
+                <style>
+                  <class name="fx-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">4</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="fx-button"/>
-            </style>
           </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">4</property>
-          </packing>
-        </child>
+        </property>
       </object>
-      <packing>
-        <property name="name">advanced</property>
-      </packing>
     </child>
   </object>
   <object class="GtkSizeGroup">
-    <property name="mode">both</property>
+    <property name="mode">3</property>
     <widgets>
       <widget name="basic"/>
       <widget name="advanced"/>
diff --git a/src/ui/buttons-basic.ui b/src/ui/buttons-basic.ui
index dcf0ae82..e9fae7fc 100644
--- a/src/ui/buttons-basic.ui
+++ b/src/ui/buttons-basic.ui
@@ -1,9 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-naming-policy toplevel-contextual -->
-  <requires lib="gtk+" version="3.16"/>
-  <object class="HdyLeaflet" id="button_panel">
-    <property name="visible">True</property>
+  <requires lib="gtk" version="4.0"/>
+  <object class="AdwLeaflet" id="button_panel">
     <property name="can-swipe-back">True</property>
     <property name="can-swipe-forward">True</property>
     <property name="transition-type">slide</property>
@@ -13,503 +11,437 @@
     </style>
     <child>
       <object class="GtkGrid" id="basic">
-        <property name="visible">True</property>
-        <property name="hexpand">true</property>
-        <property name="row-homogeneous">True</property>
-        <property name="column-homogeneous">True</property>
+        <property name="hexpand">1</property>
+        <property name="row-homogeneous">1</property>
+        <property name="column-homogeneous">1</property>
         <property name="row_spacing">4</property>
         <property name="column_spacing">4</property>
         <child>
           <object class="GtkButton" id="calc_4_button">
             <property name="label">4</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
             <property name="action_name">cal.insert-digit</property>
             <property name="action_target">4</property>
             <style>
               <class name="number-button"/>
             </style>
+            <layout>
+              <property name="row">2</property>
+            </layout>
           </object>
-          <packing>
-            <property name="top_attach">2</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_7_button">
             <property name="label">7</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
             <property name="action_name">cal.insert-digit</property>
             <property name="action_target">7</property>
             <style>
               <class name="number-button"/>
             </style>
+            <layout>
+              <property name="row">1</property>
+              <property name="column">0</property>
+            </layout>
           </object>
-          <packing>
-            <property name="top_attach">1</property>
-            <property name="left_attach">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_8_button">
             <property name="label">8</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
             <property name="action_name">cal.insert-digit</property>
             <property name="action_target">8</property>
             <style>
               <class name="number-button"/>
             </style>
+            <layout>
+              <property name="column">1</property>
+              <property name="row">1</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">1</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_9_button">
             <property name="label">9</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
             <property name="action_name">cal.insert-digit</property>
             <property name="action_target">9</property>
             <style>
               <class name="number-button"/>
             </style>
+            <layout>
+              <property name="column">2</property>
+              <property name="row">1</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">1</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_5_button">
             <property name="label">5</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
             <property name="action_name">cal.insert-digit</property>
             <property name="action_target">5</property>
             <style>
               <class name="number-button"/>
             </style>
+            <layout>
+              <property name="column">1</property>
+              <property name="row">2</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">2</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_6_button">
             <property name="label">6</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
             <property name="action_name">cal.insert-digit</property>
             <property name="action_target">6</property>
             <style>
               <class name="number-button"/>
             </style>
+            <layout>
+              <property name="column">2</property>
+              <property name="row">2</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">2</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_modulus_divide_button">
             <property name="label">mod</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Modulus divide</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
+            <property name="tooltip_text" translatable="1">Modulus divide</property>
             <property name="action_name">cal.insert-general</property>
-            <property name="action_target">' mod '</property>
+            <property name="action_target">&apos; mod &apos;</property>
             <style>
               <class name="operator-button"/>
             </style>
+            <layout>
+              <property name="column">3</property>
+              <property name="row">0</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_divide_button">
             <property name="label">÷</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Divide [/]</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
+            <property name="tooltip_text" translatable="1">Divide [/]</property>
             <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'÷'</property>
+            <property name="action_target">&apos;÷&apos;</property>
             <style>
               <class name="operator-button"/>
             </style>
+            <layout>
+              <property name="column">3</property>
+              <property name="row">1</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">1</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_1_button">
             <property name="label">1</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
             <property name="action_name">cal.insert-digit</property>
             <property name="action_target">1</property>
             <style>
               <class name="number-button"/>
             </style>
+            <layout>
+              <property name="row">3</property>
+              <property name="column">0</property>
+            </layout>
           </object>
-          <packing>
-            <property name="top_attach">3</property>
-            <property name="left_attach">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_2_button">
             <property name="label">2</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
             <property name="action_name">cal.insert-digit</property>
             <property name="action_target">2</property>
             <style>
               <class name="number-button"/>
             </style>
+            <layout>
+              <property name="column">1</property>
+              <property name="row">3</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">3</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_0_button">
             <property name="label">0</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
             <property name="action_name">cal.insert-digit</property>
             <property name="action_target">0</property>
             <style>
               <class name="number-button"/>
             </style>
+            <layout>
+              <property name="row">4</property>
+              <property name="column">0</property>
+            </layout>
           </object>
-          <packing>
-            <property name="top_attach">4</property>
-            <property name="left_attach">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_numeric_point_button">
             <property name="label" comments="Label is set in gtk.c to comply with LC flags">.</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
             <property name="action_name">cal.insert-numeric-point</property>
             <style>
               <class name="numeric-point-button"/>
             </style>
+            <layout>
+              <property name="column">1</property>
+              <property name="row">4</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">4</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_3_button">
             <property name="label">3</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
             <property name="action_name">cal.insert-digit</property>
             <property name="action_target">3</property>
             <style>
               <class name="number-button"/>
             </style>
+            <layout>
+              <property name="column">2</property>
+              <property name="row">3</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">3</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_multiply_button">
             <property name="label">×</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Multiply [*]</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
+            <property name="tooltip_text" translatable="1">Multiply [*]</property>
             <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'×'</property>
+            <property name="action_target">&apos;×&apos;</property>
             <style>
               <class name="operator-button"/>
             </style>
+            <layout>
+              <property name="column">3</property>
+              <property name="row">2</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">2</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_subtract_button">
             <property name="label">−</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Subtract [-]</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
+            <property name="tooltip_text" translatable="1">Subtract [-]</property>
             <property name="action_name">cal.subtract</property>
             <style>
               <class name="operator-button"/>
             </style>
+            <layout>
+              <property name="column">3</property>
+              <property name="row">3</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">3</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_add_button">
             <property name="label">+</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Add [+]</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
+            <property name="tooltip_text" translatable="1">Add [+]</property>
             <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'+'</property>
+            <property name="action_target">&apos;+&apos;</property>
             <style>
               <class name="operator-button"/>
             </style>
+            <layout>
+              <property name="column">3</property>
+              <property name="row">4</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">4</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_pi_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Pi [Ctrl+P]</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
+            <property name="tooltip_text" translatable="1">Pi [Ctrl+P]</property>
             <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'π'</property>
+            <property name="action_target">&apos;π&apos;</property>
             <child>
               <object class="GtkLabel" id="pi_label">
-                <property name="visible">True</property>
                 <property name="label">π</property>
-                <property name="use_markup">True</property>
+                <property name="use_markup">1</property>
               </object>
             </child>
             <style>
               <class name="function-button"/>
             </style>
+            <layout>
+              <property name="column">4</property>
+              <property name="row">0</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_root_button">
             <property name="label">√</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Root [Ctrl+R]</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
+            <property name="tooltip_text" translatable="1">Root [Ctrl+R]</property>
             <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'√'</property>
+            <property name="action_target">&apos;√&apos;</property>
             <style>
               <class name="function-button"/>
             </style>
+            <layout>
+              <property name="column">4</property>
+              <property name="row">1</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">1</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_x_squared_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Square [Ctrl+2]</property>
+            <property name="receives_default">1</property>
+            <property name="focus_on_click">0</property>
+            <property name="tooltip_text" translatable="1">Square [Ctrl+2]</property>
             <property name="action_name">cal.square</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_x_squared_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the exponentiation (x to the power of y) button">Exponent</property>
-              </object>
-            </child>
             <child>
               <object class="GtkLabel" id="x_squared_label">
-                <property name="visible">True</property>
                 <property 
name="label">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;&lt;i&gt;2&lt;/i&gt;&lt;/sup&gt;</property>
-                <property name="use_markup">True</property>
+                <property name="use_markup">1</property>
               </object>
             </child>
             <style>
               <class name="function-button"/>
             </style>
+            <layout>
+              <property name="column">4</property>
+              <property name="row">2</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">2</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_clear_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Clear Display [Escape]</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
+            <property name="tooltip_text" translatable="1">Clear Display [Escape]</property>
             <property name="action_name">cal.clear</property>
-            <child>
-              <object class="GtkImage" id="calc_clear_icon">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="icon_name">edit-clear-symbolic</property>
-              </object>
-            </child>
+            <property name="icon_name">edit-clear-symbolic</property>
             <style>
               <class name="destructive-action"/>
-              <class name="image-button"/>
               <class name="clear-button"/>
             </style>
+            <layout>
+              <property name="column">0</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_start_group_button">
             <property name="label">(</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Start Group [(]</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
+            <property name="tooltip_text" translatable="1">Start Group [(]</property>
             <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'('</property>
+            <property name="action_target">&apos;(&apos;</property>
             <style>
               <class name="parenthesis-button"/>
             </style>
+            <layout>
+              <property name="column">1</property>
+              <property name="row">0</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_end_group_button">
             <property name="label">)</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">End Group [)]</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
+            <property name="tooltip_text" translatable="1">End Group [)]</property>
             <property name="action_name">cal.insert-general</property>
-            <property name="action_target">')'</property>
+            <property name="action_target">&apos;)&apos;</property>
             <style>
               <class name="parenthesis-button"/>
             </style>
+            <layout>
+              <property name="column">2</property>
+              <property name="row">0</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_percentage_button">
             <property name="label">%</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Percentage [%]</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
+            <property name="tooltip_text" translatable="1">Percentage [%]</property>
             <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'%'</property>
+            <property name="action_target">&apos;%&apos;</property>
             <style>
               <class name="procent-button"/>
             </style>
+            <layout>
+              <property name="column">2</property>
+              <property name="row">4</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">4</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="calc_result_button">
-            <property name="label" translatable="yes" comments="Label on the solve button (clicking this 
solves the displayed calculation)">=</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Calculate Result</property>
+            <property name="label" translatable="1" comments="Label on the solve button (clicking this 
solves the displayed calculation)">=</property>
+            <property name="receives_default">1</property>
+            <property name="use_underline">1</property>
+            <property name="focus_on_click">0</property>
+            <property name="tooltip_text" translatable="1">Calculate Result</property>
             <property name="action_name">cal.solve</property>
             <style>
               <class name="suggested-action"/>
             </style>
+            <layout>
+              <property name="column">4</property>
+              <property name="row">3</property>
+              <property name="row-span">2</property>
+            </layout>
           </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">3</property>
-            <property name="height">2</property>
-          </packing>
         </child>
       </object>
-      <packing>
-        <property name="name">basic</property>
-      </packing>
     </child>
   </object>
 </interface>
diff --git a/src/ui/buttons-financial.ui b/src/ui/buttons-financial.ui
index 63a8e53d..159caf2e 100644
--- a/src/ui/buttons-financial.ui
+++ b/src/ui/buttons-financial.ui
@@ -1,52 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-naming-policy toplevel-contextual -->
-  <requires lib="gtk+" version="3.16"/>
+  <requires lib="gtk" version="4.0"/>
   <object class="GtkDialog" id="ctrm_dialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes" comments="Title of Compounding Term dialog">Compounding 
Term</property>
-    <property name="resizable">True</property>
-    <property name="type_hint">dialog</property>
+    <property name="title" translatable="1" comments="Title of Compounding Term dialog">Compounding 
Term</property>
     <property name="default_width">618</property>
     <property name="default_width">198</property>
-    <child internal-child="vbox">
+    <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child internal-child="action_area">
-          <object class="GtkBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="halign">end</property>
-            <property name="orientation">horizontal</property>
-            <child>
-              <object class="GtkButton" id="button1">
-                <property name="label" translatable="yes">_Cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkButton" id="button2">
-                <property name="label" translatable="yes" comments="Compounding Term Dialog: Calculate 
button">C_alculate</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-          </object>
-        </child>
         <child>
           <object class="GtkGrid">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="margin_start">6</property>
             <property name="margin_end">6</property>
             <property name="margin_top">6</property>
@@ -55,98 +18,81 @@
             <property name="row_spacing">6</property>
             <child>
               <object class="GtkEntry" id="ctrm_pint">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="ctrm_fv">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="ctrm_pv">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label5">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Compounding Term Dialog: Label before 
present value input">Present _Value:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Compounding Term Dialog: Label before 
present value input">Present _Value:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">ctrm_pv</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label6">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Compounding Term Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Compounding Term Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">ctrm_pint</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label9">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">center</property>
+                <property name="halign">3</property>
                 <property name="width-chars">50</property>
-                <property name="label" translatable="yes" comments="Compounding Term Dialog: Description of 
calculation">Calculates the number of compounding periods necessary to increase an investment of present 
value to a future value, at a fixed interest rate per compounding period.</property>
-                <property name="wrap">True</property>
+                <property name="label" translatable="1" comments="Compounding Term Dialog: Description of 
calculation">Calculates the number of compounding periods necessary to increase an investment of present 
value to a future value, at a fixed interest rate per compounding period.</property>
+                <property name="wrap">1</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="width">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label16">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Compounding Term Dialog: Label before 
future value input">_Future Value:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Compounding Term Dialog: Label before 
future value input">_Future Value:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">ctrm_fv</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
           </object>
         </child>
@@ -156,51 +102,33 @@
       <action-widget response="-6">button1</action-widget>
       <action-widget response="-5">button2</action-widget>
     </action-widgets>
+    <child internal-child="action_area">
+      <object class="GtkBox" id="dialog-action_area1">
+        <property name="halign">2</property>
+        <child>
+          <object class="GtkButton" id="button1">
+            <property name="label" translatable="1">_Cancel</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton" id="button2">
+            <property name="label" translatable="1" comments="Compounding Term Dialog: Calculate 
button">C_alculate</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
   </object>
   <object class="GtkDialog" id="ddb_dialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes" comments="Title of Double-Declining Depreciation 
dialog">Double-Declining Depreciation</property>
-    <property name="resizable">True</property>
-    <property name="type_hint">dialog</property>
+    <property name="title" translatable="1" comments="Title of Double-Declining Depreciation 
dialog">Double-Declining Depreciation</property>
     <property name="default_width">618</property>
     <property name="default_width">198</property>
-    <child internal-child="vbox">
+    <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox2">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child internal-child="action_area">
-          <object class="GtkBox" id="dialog-action_area2">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="orientation">horizontal</property>
-            <child>
-              <object class="GtkButton" id="button3">
-                <property name="label" translatable="yes">_Cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkButton" id="button4">
-                <property name="label" translatable="yes" comments="Double-Declining Depreciation Dialog: 
Calculate button">C_alculate</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-          </object>
-        </child>
         <child>
           <object class="GtkGrid">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="margin_start">6</property>
             <property name="margin_end">6</property>
             <property name="margin_top">6</property>
@@ -209,98 +137,81 @@
             <property name="row_spacing">6</property>
             <child>
               <object class="GtkLabel" id="label7">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">center</property>
+                <property name="halign">3</property>
                 <property name="width-chars">50</property>
-                <property name="label" translatable="yes" comments="Double-Declining Depreciation Dialog: 
Description of calculation">Calculates the depreciation allowance on an asset for a specified period of time, 
using the double-declining balance method.</property>
-                <property name="wrap">True</property>
+                <property name="label" translatable="1" comments="Double-Declining Depreciation Dialog: 
Description of calculation">Calculates the depreciation allowance on an asset for a specified period of time, 
using the double-declining balance method.</property>
+                <property name="wrap">1</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="width">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label8">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Double-Declining Depreciation Dialog: 
Label before cost input">C_ost:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Double-Declining Depreciation Dialog: 
Label before cost input">C_ost:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">ddb_cost</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label10">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Double-Declining Depreciation Dialog: 
Label before life input">_Life:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Double-Declining Depreciation Dialog: 
Label before life input">_Life:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">ddb_life</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="ddb_life">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="ddb_cost">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label11">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Double-Declining Depreciation Dialog: 
Label before period input">_Period:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Double-Declining Depreciation Dialog: 
Label before period input">_Period:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">ddb_period</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="ddb_period">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
           </object>
         </child>
@@ -310,51 +221,32 @@
       <action-widget response="-6">button3</action-widget>
       <action-widget response="-5">button4</action-widget>
     </action-widgets>
+    <child internal-child="action_area">
+      <object class="GtkBox" id="dialog-action_area2">
+        <child>
+          <object class="GtkButton" id="button3">
+            <property name="label" translatable="1">_Cancel</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton" id="button4">
+            <property name="label" translatable="1" comments="Double-Declining Depreciation Dialog: 
Calculate button">C_alculate</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
   </object>
   <object class="GtkDialog" id="fv_dialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes" comments="Title of Future Value dialog">Future Value</property>
-    <property name="resizable">True</property>
-    <property name="type_hint">dialog</property>
+    <property name="title" translatable="1" comments="Title of Future Value dialog">Future Value</property>
     <property name="default_width">618</property>
     <property name="default_width">198</property>
-    <child internal-child="vbox">
+    <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox3">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child internal-child="action_area">
-          <object class="GtkBox" id="dialog-action_area3">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="orientation">horizontal</property>
-            <child>
-              <object class="GtkButton" id="button5">
-                <property name="label" translatable="yes">_Cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkButton" id="button6">
-                <property name="label" translatable="yes" comments="Future Value Dialog: Calculate 
button">C_alculate</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-          </object>
-        </child>
         <child>
           <object class="GtkGrid">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="margin_start">6</property>
             <property name="margin_end">6</property>
             <property name="margin_top">6</property>
@@ -363,97 +255,80 @@
             <property name="row_spacing">6</property>
             <child>
               <object class="GtkLabel" id="label12">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
                 <property name="width-chars">50</property>
-                <property name="label" translatable="yes" comments="Future Value Dialog: Description of 
calculation">Calculates the future value of an investment based on a series of equal payments at a periodic 
interest rate over the number of payment periods in the term.</property>
-                <property name="wrap">True</property>
+                <property name="label" translatable="1" comments="Future Value Dialog: Description of 
calculation">Calculates the future value of an investment based on a series of equal payments at a periodic 
interest rate over the number of payment periods in the term.</property>
+                <property name="wrap">1</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="width">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label13">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Future Value Dialog: Label before 
periodic payment input">_Periodic Payment:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Future Value Dialog: Label before periodic 
payment input">_Periodic Payment:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">fv_pmt</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label14">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Future Value Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Future Value Dialog: Label before periodic 
interest rate input">Periodic Interest _Rate:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">fv_pint</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label15">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Future Value Dialog: Label before number 
of periods input">_Number of Periods:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Future Value Dialog: Label before number 
of periods input">_Number of Periods:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">fv_n</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="fv_n">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="fv_pint">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="fv_pmt">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
           </object>
         </child>
@@ -463,52 +338,32 @@
       <action-widget response="-6">button5</action-widget>
       <action-widget response="-5">button6</action-widget>
     </action-widgets>
+    <child internal-child="action_area">
+      <object class="GtkBox" id="dialog-action_area3">
+        <child>
+          <object class="GtkButton" id="button5">
+            <property name="label" translatable="1">_Cancel</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton" id="button6">
+            <property name="label" translatable="1" comments="Future Value Dialog: Calculate 
button">C_alculate</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
   </object>
   <object class="GtkDialog" id="gpm_dialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes" comments="Title of Gross Profit Margin dialog">Gross Profit 
Margin</property>
-    <property name="resizable">True</property>
-    <property name="type_hint">dialog</property>
+    <property name="title" translatable="1" comments="Title of Gross Profit Margin dialog">Gross Profit 
Margin</property>
     <property name="default_width">618</property>
     <property name="default_width">198</property>
-    <child internal-child="vbox">
+    <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox10">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child internal-child="action_area">
-          <object class="GtkBox" id="dialog-action_area10">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="halign">end</property>
-            <property name="orientation">horizontal</property>
-            <child>
-              <object class="GtkButton" id="button19">
-                <property name="label" translatable="yes">_Cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkButton" id="button20">
-                <property name="label" translatable="yes" comments="Gross Profit Margin Dialog: Calculate 
button">C_alculate</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-          </object>
-        </child>
         <child>
           <object class="GtkGrid">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="margin_start">6</property>
             <property name="margin_end">6</property>
             <property name="margin_top">6</property>
@@ -517,70 +372,58 @@
             <property name="row_spacing">6</property>
             <child>
               <object class="GtkLabel" id="label47">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
                 <property name="width-chars">50</property>
-                <property name="label" translatable="yes" comments="Gross Profit Margin Dialog: Description 
of calculation">Calculates the resale price of a product, based on the product cost and the wanted gross 
profit margin.</property>
-                <property name="wrap">True</property>
+                <property name="label" translatable="1" comments="Gross Profit Margin Dialog: Description of 
calculation">Calculates the resale price of a product, based on the product cost and the wanted gross profit 
margin.</property>
+                <property name="wrap">1</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="width">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label48">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Gross Profit Margin Dialog: Label before 
cost input">C_ost:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Gross Profit Margin Dialog: Label before 
cost input">C_ost:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">gpm_cost</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label49">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Gross Profit Margin Dialog: Label before 
margin input">_Margin:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Gross Profit Margin Dialog: Label before 
margin input">_Margin:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">gpm_margin</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="gpm_cost">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="gpm_margin">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
           </object>
         </child>
@@ -590,52 +433,33 @@
       <action-widget response="-6">button19</action-widget>
       <action-widget response="-5">button20</action-widget>
     </action-widgets>
+    <child internal-child="action_area">
+      <object class="GtkBox" id="dialog-action_area10">
+        <property name="halign">2</property>
+        <child>
+          <object class="GtkButton" id="button19">
+            <property name="label" translatable="1">_Cancel</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton" id="button20">
+            <property name="label" translatable="1" comments="Gross Profit Margin Dialog: Calculate 
button">C_alculate</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
   </object>
   <object class="GtkDialog" id="pmt_dialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes" comments="Title of Periodic Payment dialog">Periodic 
Payment</property>
-    <property name="resizable">True</property>
-    <property name="type_hint">dialog</property>
+    <property name="title" translatable="1" comments="Title of Periodic Payment dialog">Periodic 
Payment</property>
     <property name="default_width">618</property>
     <property name="default_width">198</property>
-    <child internal-child="vbox">
+    <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox4">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child internal-child="action_area">
-          <object class="GtkBox" id="dialog-action_area4">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="halign">end</property>
-            <property name="orientation">horizontal</property>
-            <child>
-              <object class="GtkButton" id="button7">
-                <property name="label" translatable="yes">_Cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkButton" id="button8">
-                <property name="label" translatable="yes" comments="Periodic Payment Dialog: Calculate 
button">C_alculate</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-          </object>
-        </child>
         <child>
           <object class="GtkGrid">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="margin_start">6</property>
             <property name="margin_end">6</property>
             <property name="margin_top">6</property>
@@ -644,98 +468,81 @@
             <property name="row_spacing">6</property>
             <child>
               <object class="GtkLabel" id="label17">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="width-chars">50</property>
-                <property name="label" translatable="yes" comments="Periodic Payment Dialog: Description of 
calculation">Calculates the amount of the periodic payment of a loan, where payments are made at the end of 
each payment period. </property>
-                <property name="wrap">True</property>
+                <property name="label" translatable="1" comments="Periodic Payment Dialog: Description of 
calculation">Calculates the amount of the periodic payment of a loan, where payments are made at the end of 
each payment period. </property>
+                <property name="wrap">1</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="width">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label18">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Periodic Payment Dialog: Label before 
principal input">_Principal:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Periodic Payment Dialog: Label before 
principal input">_Principal:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">pmt_prin</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label19">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Periodic Payment Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Periodic Payment Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">pmt_pint</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label21">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Periodic Payment Dialog: Label before 
term input">_Term:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Periodic Payment Dialog: Label before term 
input">_Term:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">pmt_n</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="pmt_prin">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="pmt_pint">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="pmt_n">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
           </object>
         </child>
@@ -745,52 +552,33 @@
       <action-widget response="-6">button7</action-widget>
       <action-widget response="-5">button8</action-widget>
     </action-widgets>
+    <child internal-child="action_area">
+      <object class="GtkBox" id="dialog-action_area4">
+        <property name="halign">2</property>
+        <child>
+          <object class="GtkButton" id="button7">
+            <property name="label" translatable="1">_Cancel</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton" id="button8">
+            <property name="label" translatable="1" comments="Periodic Payment Dialog: Calculate 
button">C_alculate</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
   </object>
   <object class="GtkDialog" id="pv_dialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes" comments="Title of Present Value dialog">Present 
Value</property>
-    <property name="resizable">True</property>
-    <property name="type_hint">dialog</property>
+    <property name="title" translatable="1" comments="Title of Present Value dialog">Present Value</property>
     <property name="default_width">618</property>
     <property name="default_width">198</property>
-    <child internal-child="vbox">
+    <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox5">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child internal-child="action_area">
-          <object class="GtkBox" id="dialog-action_area5">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="halign">end</property>
-            <property name="orientation">horizontal</property>
-            <child>
-              <object class="GtkButton" id="button9">
-                <property name="label" translatable="yes">_Cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkButton" id="button10">
-                <property name="label" translatable="yes" comments="Present Value Dialog: Calculate 
button">C_alculate</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-          </object>
-        </child>
         <child>
           <object class="GtkGrid">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="margin_start">6</property>
             <property name="margin_end">6</property>
             <property name="margin_top">6</property>
@@ -799,98 +587,81 @@
             <property name="row_spacing">6</property>
             <child>
               <object class="GtkLabel" id="label36">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="width-chars">50</property>
-                <property name="label" translatable="yes" comments="Present Value Dialog: Description of 
calculation">Calculates the present value of an investment based on a series of equal payments discounted at 
a periodic interest rate over the number of payment periods in the term. </property>
-                <property name="wrap">True</property>
+                <property name="label" translatable="1" comments="Present Value Dialog: Description of 
calculation">Calculates the present value of an investment based on a series of equal payments discounted at 
a periodic interest rate over the number of payment periods in the term. </property>
+                <property name="wrap">1</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="width">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label24">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Present Value Dialog: Label before 
periodic payment input">_Periodic Payment:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Present Value Dialog: Label before 
periodic payment input">_Periodic Payment:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">pv_pmt</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label25">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Present Value Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Present Value Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">pv_pint</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label26">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Present Value Dialog: Label before 
number of periods input">_Number of Periods:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Present Value Dialog: Label before number 
of periods input">_Number of Periods:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">pv_n</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="pv_pmt">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="pv_pint">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="pv_n">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
           </object>
         </child>
@@ -900,52 +671,33 @@
       <action-widget response="-6">button9</action-widget>
       <action-widget response="-5">button10</action-widget>
     </action-widgets>
+    <child internal-child="action_area">
+      <object class="GtkBox" id="dialog-action_area5">
+        <property name="halign">2</property>
+        <child>
+          <object class="GtkButton" id="button9">
+            <property name="label" translatable="1">_Cancel</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton" id="button10">
+            <property name="label" translatable="1" comments="Present Value Dialog: Calculate 
button">C_alculate</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
   </object>
   <object class="GtkDialog" id="rate_dialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes" comments="Title of Periodic Interest Rate dialog">Periodic 
Interest Rate</property>
-    <property name="resizable">True</property>
-    <property name="type_hint">dialog</property>
+    <property name="title" translatable="1" comments="Title of Periodic Interest Rate dialog">Periodic 
Interest Rate</property>
     <property name="default_width">618</property>
     <property name="default_width">198</property>
-    <child internal-child="vbox">
+    <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox6">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child internal-child="action_area">
-          <object class="GtkBox" id="dialog-action_area6">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="halign">end</property>
-            <property name="orientation">horizontal</property>
-            <child>
-              <object class="GtkButton" id="button11">
-                <property name="label" translatable="yes">_Cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkButton" id="button12">
-                <property name="label" translatable="yes" comments="Periodic Interest Rate Dialog: Calculate 
button">C_alculate</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-          </object>
-        </child>
         <child>
           <object class="GtkGrid">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="margin_start">6</property>
             <property name="margin_end">6</property>
             <property name="margin_top">6</property>
@@ -954,98 +706,81 @@
             <property name="row_spacing">6</property>
             <child>
               <object class="GtkLabel" id="label28">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="width-chars">50</property>
-                <property name="label" translatable="yes" comments="Periodic Interest Rate Dialog: 
Description of calculation">Calculates the periodic interest necessary to increase an investment to a future 
value, over the number of compounding periods. </property>
-                <property name="wrap">True</property>
+                <property name="label" translatable="1" comments="Periodic Interest Rate Dialog: Description 
of calculation">Calculates the periodic interest necessary to increase an investment to a future value, over 
the number of compounding periods. </property>
+                <property name="wrap">1</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="width">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label29">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Periodic Interest Rate Dialog: Label 
before future value input">_Future Value:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Periodic Interest Rate Dialog: Label 
before future value input">_Future Value:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">rate_fv</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label30">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Periodic Interest Rate Dialog: Label 
before present value input">Present _Value:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Periodic Interest Rate Dialog: Label 
before present value input">Present _Value:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">rate_pv</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label31">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Periodic Interest Rate Dialog: Label 
before term input">_Term:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Periodic Interest Rate Dialog: Label 
before term input">_Term:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">rate_n</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="rate_fv">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="rate_pv">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="rate_n">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
           </object>
         </child>
@@ -1055,52 +790,33 @@
       <action-widget response="-6">button11</action-widget>
       <action-widget response="-5">button12</action-widget>
     </action-widgets>
+    <child internal-child="action_area">
+      <object class="GtkBox" id="dialog-action_area6">
+        <property name="halign">2</property>
+        <child>
+          <object class="GtkButton" id="button11">
+            <property name="label" translatable="1">_Cancel</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton" id="button12">
+            <property name="label" translatable="1" comments="Periodic Interest Rate Dialog: Calculate 
button">C_alculate</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
   </object>
   <object class="GtkDialog" id="sln_dialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes" comments="Title of Straight-Line Depreciation 
dialog">Straight-Line Depreciation</property>
-    <property name="resizable">True</property>
-    <property name="type_hint">dialog</property>
+    <property name="title" translatable="1" comments="Title of Straight-Line Depreciation 
dialog">Straight-Line Depreciation</property>
     <property name="default_width">618</property>
     <property name="default_width">198</property>
-    <child internal-child="vbox">
+    <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox7">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child internal-child="action_area">
-          <object class="GtkBox" id="dialog-action_area7">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="halign">end</property>
-            <property name="orientation">horizontal</property>
-            <child>
-              <object class="GtkButton" id="button13">
-                <property name="label" translatable="yes">_Cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkButton" id="button14">
-                <property name="label" translatable="yes" comments="Straight-Line Depreciation Dialog: 
Calculate button">C_alculate</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-          </object>
-        </child>
         <child>
           <object class="GtkGrid">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="margin_start">6</property>
             <property name="margin_end">6</property>
             <property name="margin_top">6</property>
@@ -1109,98 +825,81 @@
             <property name="row_spacing">6</property>
             <child>
               <object class="GtkLabel" id="label33">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Straight-Line Depreciation Dialog: Label 
before cost input">_Cost:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Straight-Line Depreciation Dialog: Label 
before cost input">_Cost:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">sln_cost</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label34">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Straight-Line Depreciation Dialog: Label 
before salvage input">_Salvage:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Straight-Line Depreciation Dialog: Label 
before salvage input">_Salvage:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">sln_salvage</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label35">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Straight-Line Depreciation Dialog: Label 
before life input">_Life:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Straight-Line Depreciation Dialog: Label 
before life input">_Life:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">sln_life</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="sln_life">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="sln_salvage">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="sln_cost">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label32">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="width-chars">50</property>
-                <property name="label" translatable="yes" comments="Straight-Line Depreciation Dialog: 
Description of calculation">Calculates the straight-line depreciation of an asset for one period. The 
straight-line method of depreciation divides the depreciable cost evenly over the useful life of an asset. 
The useful life is the number of periods, typically years, over which an asset is depreciated. </property>
-                <property name="wrap">True</property>
+                <property name="label" translatable="1" comments="Straight-Line Depreciation Dialog: 
Description of calculation">Calculates the straight-line depreciation of an asset for one period. The 
straight-line method of depreciation divides the depreciable cost evenly over the useful life of an asset. 
The useful life is the number of periods, typically years, over which an asset is depreciated. </property>
+                <property name="wrap">1</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="width">2</property>
-              </packing>
             </child>
           </object>
         </child>
@@ -1210,52 +909,33 @@
       <action-widget response="-6">button13</action-widget>
       <action-widget response="-5">button14</action-widget>
     </action-widgets>
+    <child internal-child="action_area">
+      <object class="GtkBox" id="dialog-action_area7">
+        <property name="halign">2</property>
+        <child>
+          <object class="GtkButton" id="button13">
+            <property name="label" translatable="1">_Cancel</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton" id="button14">
+            <property name="label" translatable="1" comments="Straight-Line Depreciation Dialog: Calculate 
button">C_alculate</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
   </object>
   <object class="GtkDialog" id="syd_dialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes" comments="Title of Sum-of-the-Years’-Digits Depreciation 
dialog">Sum-of-the-Years’-Digits Depreciation</property>
-    <property name="resizable">True</property>
-    <property name="type_hint">dialog</property>
+    <property name="title" translatable="1" comments="Title of Sum-of-the-Years’-Digits Depreciation 
dialog">Sum-of-the-Years’-Digits Depreciation</property>
     <property name="default_width">618</property>
     <property name="default_width">198</property>
-    <child internal-child="vbox">
+    <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox8">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child internal-child="action_area">
-          <object class="GtkBox" id="dialog-action_area8">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="halign">end</property>
-            <property name="orientation">horizontal</property>
-            <child>
-              <object class="GtkButton" id="button15">
-                <property name="label" translatable="yes">_Cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkButton" id="button16">
-                <property name="label" translatable="yes" comments="Sum-of-the-Years’-Digits Depreciation 
Dialog: Calculate result button">C_alculate</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-          </object>
-        </child>
         <child>
           <object class="GtkGrid">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="margin_start">6</property>
             <property name="margin_end">6</property>
             <property name="margin_top">6</property>
@@ -1264,125 +944,103 @@
             <property name="row_spacing">6</property>
             <child>
               <object class="GtkLabel" id="label37">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Sum-of-the-Years’-Digits Depreciation 
Dialog: Label before period input">_Period:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Sum-of-the-Years’-Digits Depreciation 
Dialog: Label before period input">_Period:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">syd_period</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">4</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">4</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label38">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Sum-of-the-Years’-Digits Depreciation 
Dialog: Label before life input">_Life:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Sum-of-the-Years’-Digits Depreciation 
Dialog: Label before life input">_Life:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">syd_life</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label39">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Sum-of-the-Years’-Digits Depreciation 
Dialog: Label before salvage input">_Salvage:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Sum-of-the-Years’-Digits Depreciation 
Dialog: Label before salvage input">_Salvage:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">syd_salvage</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label40">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Sum-of-the-Years’-Digits Depreciation 
Dialog: Label before cost input">_Cost:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Sum-of-the-Years’-Digits Depreciation 
Dialog: Label before cost input">_Cost:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">syd_cost</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="syd_cost">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="syd_salvage">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="syd_life">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="syd_period">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">4</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">4</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label41">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="width-chars">50</property>
-                <property name="label" translatable="yes" comments="Sum-of-the-Years’-Digits Depreciation 
Dialog: Description of calculation">Calculates the depreciation allowance on an asset for a specified period 
of time, using the Sum-of-the-Years’-Digits method. This method of depreciation accelerates the rate of 
depreciation, so that more depreciation expense occurs in earlier periods than in later ones. The useful life 
is the number of periods, typically years, over which an asset is depreciated. </property>
-                <property name="wrap">True</property>
+                <property name="label" translatable="1" comments="Sum-of-the-Years’-Digits Depreciation 
Dialog: Description of calculation">Calculates the depreciation allowance on an asset for a specified period 
of time, using the Sum-of-the-Years’-Digits method. This method of depreciation accelerates the rate of 
depreciation, so that more depreciation expense occurs in earlier periods than in later ones. The useful life 
is the number of periods, typically years, over which an asset is depreciated. </property>
+                <property name="wrap">1</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="width">2</property>
-              </packing>
             </child>
           </object>
         </child>
@@ -1392,52 +1050,33 @@
       <action-widget response="-6">button15</action-widget>
       <action-widget response="-5">button16</action-widget>
     </action-widgets>
+    <child internal-child="action_area">
+      <object class="GtkBox" id="dialog-action_area8">
+        <property name="halign">2</property>
+        <child>
+          <object class="GtkButton" id="button15">
+            <property name="label" translatable="1">_Cancel</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton" id="button16">
+            <property name="label" translatable="1" comments="Sum-of-the-Years’-Digits Depreciation Dialog: 
Calculate result button">C_alculate</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
   </object>
   <object class="GtkDialog" id="term_dialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes" comments="Title of Payment Period dialog">Payment 
Period</property>
-    <property name="resizable">True</property>
-    <property name="type_hint">dialog</property>
+    <property name="title" translatable="1" comments="Title of Payment Period dialog">Payment 
Period</property>
     <property name="default_width">618</property>
     <property name="default_width">198</property>
-    <child internal-child="vbox">
+    <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox9">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child internal-child="action_area">
-          <object class="GtkBox" id="dialog-action_area9">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="halign">end</property>
-            <property name="orientation">horizontal</property>
-            <child>
-              <object class="GtkButton" id="button17">
-                <property name="label" translatable="yes">_Cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkButton" id="button18">
-                <property name="label" translatable="yes" comments="Payment Period Dialog: Button to 
calculate result">C_alculate</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-          </object>
-        </child>
         <child>
           <object class="GtkGrid">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="margin_start">6</property>
             <property name="margin_end">6</property>
             <property name="margin_top">6</property>
@@ -1446,98 +1085,81 @@
             <property name="row_spacing">6</property>
             <child>
               <object class="GtkEntry" id="term_pint">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="term_fv">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkEntry" id="term_pmt">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
                 <property name="text">0</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label43">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Payment Period Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Payment Period Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">term_pint</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label44">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Payment Period Dialog: Label before 
future value input">Future _Value:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Payment Period Dialog: Label before future 
value input">Future _Value:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">term_fv</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label45">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes" comments="Payment Period Dialog: Label before 
periodic payment input">_Periodic Payment:</property>
+                <property name="halign">1</property>
+                <property name="label" translatable="1" comments="Payment Period Dialog: Label before 
periodic payment input">_Periodic Payment:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">term_pmt</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label46">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="width-chars">50</property>
-                <property name="label" translatable="yes" comments="Payment Period Dialog: Description of 
calculation">Calculates the number of payment periods that are necessary during the term of an ordinary 
annuity, to accumulate a future value, at a periodic interest rate.</property>
-                <property name="wrap">True</property>
+                <property name="label" translatable="1" comments="Payment Period Dialog: Description of 
calculation">Calculates the number of payment periods that are necessary during the term of an ordinary 
annuity, to accumulate a future value, at a periodic interest rate.</property>
+                <property name="wrap">1</property>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="width">2</property>
-              </packing>
             </child>
           </object>
         </child>
@@ -1547,9 +1169,25 @@
       <action-widget response="-6">button17</action-widget>
       <action-widget response="-5">button18</action-widget>
     </action-widgets>
+    <child internal-child="action_area">
+      <object class="GtkBox" id="dialog-action_area9">
+        <property name="halign">2</property>
+        <child>
+          <object class="GtkButton" id="button17">
+            <property name="label" translatable="1">_Cancel</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton" id="button18">
+            <property name="label" translatable="1" comments="Payment Period Dialog: Button to calculate 
result">C_alculate</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+      </object>
+    </child>
   </object>
-  <object class="HdyLeaflet" id="button_panel">
-    <property name="visible">True</property>
+  <object class="AdwLeaflet" id="button_panel">
     <property name="can-swipe-back">True</property>
     <property name="can-swipe-forward">True</property>
     <property name="transition-type">slide</property>
@@ -1558,767 +1196,617 @@
       <class name="math-buttons"/>
     </style>
     <child>
-      <object class="GtkGrid" id="basic">
-        <property name="visible">True</property>
-        <property name="hexpand">true</property>
-        <property name="row-homogeneous">True</property>
-        <property name="column-homogeneous">True</property>
-        <property name="row_spacing">4</property>
-        <property name="column_spacing">4</property>
-        <child>
-          <object class="GtkButton" id="calc_4_button">
-            <property name="label">4</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">4</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_7_button">
-            <property name="label">7</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">7</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="top_attach">1</property>
-            <property name="left_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_8_button">
-            <property name="label">8</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">8</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_9_button">
-            <property name="label">9</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">9</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_5_button">
-            <property name="label">5</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">5</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_6_button">
-            <property name="label">6</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">6</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_modulus_divide_button">
-            <property name="label">mod</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Modulus divide</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">' mod '</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_divide_button">
-            <property name="label">÷</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Divide [/]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'÷'</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_1_button">
-            <property name="label">1</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">1</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="top_attach">3</property>
-            <property name="left_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_2_button">
-            <property name="label">2</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">2</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_0_button">
-            <property name="label">0</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">0</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="top_attach">4</property>
-            <property name="left_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_numeric_point_button">
-            <property name="label" comments="Label is set in gtk.c to comply with LC flags">.</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-numeric-point</property>
-            <style>
-              <class name="numeric-point-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_3_button">
-            <property name="label">3</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">3</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_multiply_button">
-            <property name="label">×</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Multiply [*]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'×'</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_subtract_button">
-            <property name="label">−</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Subtract [-]</property>
-            <property name="action_name">cal.subtract</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_add_button">
-            <property name="label">+</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Add [+]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'+'</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_root_button">
-            <property name="label">√</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Root [Ctrl+R]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'√'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_clear_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Clear Display [Escape]</property>
-            <property name="action_name">cal.clear</property>
+      <object class="AdwLeafletPage">
+        <property name="name">basic</property>
+        <property name="child">
+          <object class="GtkGrid" id="basic">
+            <property name="hexpand">True</property>
+            <property name="row-homogeneous">True</property>
+            <property name="column-homogeneous">True</property>
+            <property name="row_spacing">4</property>
+            <property name="column_spacing">4</property>
+            <child>
+              <object class="GtkButton" id="calc_4_button">
+                <property name="label">4</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">4</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="row">2</property>
+                </layout>
+              </object>
+            </child>
             <child>
-              <object class="GtkImage" id="calc_clear_icon">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="icon_name">edit-clear-symbolic</property>
+              <object class="GtkButton" id="calc_7_button">
+                <property name="label">7</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">7</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="row">1</property>
+                  <property name="column">0</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="destructive-action"/>
-              <class name="image-button"/>
-              <class name="clear-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_start_group_button">
-            <property name="label">(</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Start Group [(]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'('</property>
-            <style>
-              <class name="parenthesis-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_end_group_button">
-            <property name="label">)</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">End Group [)]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">')'</property>
-            <style>
-              <class name="parenthesis-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_percentage_button">
-            <property name="label">%</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Percentage [%]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'%'</property>
-            <style>
-              <class name="procent-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_result_button">
-            <property name="label" translatable="yes" comments="Label on the solve button (clicking this 
solves the displayed calculation)">=</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Calculate Result</property>
-            <property name="action_name">cal.solve</property>
-            <style>
-              <class name="suggested-action"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">3</property>
-            <property name="height">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_x_pow_y_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Exponent [^ or **]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'^'</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_x_pow_y_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the exponentiation (x to the power of y) button">Exponent</property>
+            <child>
+              <object class="GtkButton" id="calc_8_button">
+                <property name="label">8</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">8</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
             </child>
             <child>
-              <object class="GtkLabel" id="x_pow_y_label">
-                <property name="visible">True</property>
-                <property 
name="label">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;&lt;i&gt;y&lt;/i&gt;&lt;/sup&gt;</property>
-                <property name="use_markup">True</property>
+              <object class="GtkButton" id="calc_9_button">
+                <property name="label">9</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">9</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_logarithm_button">
-            <property name="label">log</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Logarithm</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'log '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-      </object>
-      <packing>
-        <property name="name">basic</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkGrid" id="advanced">
-        <property name="visible">True</property>
-        <property name="hexpand">true</property>
-        <property name="row-homogeneous">True</property>
-        <property name="column-homogeneous">True</property>
-        <property name="row_spacing">4</property>
-        <property name="column_spacing">4</property>
-        <child>
-          <object class="GtkMenuButton" id="calc_memory_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Memory</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_memory_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the memory button">Memory</property>
+            <child>
+              <object class="GtkButton" id="calc_5_button">
+                <property name="label">5</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">5</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
             </child>
             <child>
-              <object class="GtkHBox" id="hbox20">
-                <property name="visible">True</property>
-                <child>
-                  <object class="GtkLabel" id="label23">
-                    <property name="visible">True</property>
-                    <property name="hexpand">true</property>
-                    <property name="label" translatable="yes" comments="The label on the memory 
button">x</property>
-                    <attributes>
-                      <attribute name="style" value="italic"/>
-                    </attributes>
-                  </object>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
+              <object class="GtkButton" id="calc_6_button">
+                <property name="label">6</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">6</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">2</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_modulus_divide_button">
+                <property name="label">mod</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Modulus divide</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos; mod &apos;</property>
+                <style>
+                  <class name="operator-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">0</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_divide_button">
+                <property name="label">÷</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Divide [/]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;÷&apos;</property>
+                <style>
+                  <class name="operator-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">1</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_1_button">
+                <property name="label">1</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">1</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="row">3</property>
+                  <property name="column">0</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_2_button">
+                <property name="label">2</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">2</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_0_button">
+                <property name="label">0</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">0</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="row">4</property>
+                  <property name="column">0</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_numeric_point_button">
+                <property name="label" comments="Label is set in gtk.c to comply with LC flags">.</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-numeric-point</property>
+                <style>
+                  <class name="numeric-point-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">4</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_3_button">
+                <property name="label">3</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="action_name">cal.insert-digit</property>
+                <property name="action_target">3</property>
+                <style>
+                  <class name="number-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">3</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_multiply_button">
+                <property name="label">×</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Multiply [*]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;×&apos;</property>
+                <style>
+                  <class name="operator-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">2</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_subtract_button">
+                <property name="label">−</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Subtract [-]</property>
+                <property name="action_name">cal.subtract</property>
+                <style>
+                  <class name="operator-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">3</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_add_button">
+                <property name="label">+</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Add [+]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;+&apos;</property>
+                <style>
+                  <class name="operator-button"/>
+                </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">4</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_root_button">
+                <property name="label">√</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Root [Ctrl+R]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;√&apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">1</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_clear_button">
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Clear Display [Escape]</property>
+                <property name="icon_name">edit-clear-symbolic</property>
+                <property name="action_name">cal.clear</property>
+                <style>
+                  <class name="destructive-action"/>
+                  <class name="clear-button"/>
+                </style>
+                <layout>
+                  <property name="column">0</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_start_group_button">
+                <property name="label">(</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Start Group [(]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;(&apos;</property>
+                <style>
+                  <class name="parenthesis-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">0</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_end_group_button">
+                <property name="label">)</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">End Group [)]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;)&apos;</property>
+                <style>
+                  <class name="parenthesis-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">0</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_percentage_button">
+                <property name="label">%</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Percentage [%]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;%&apos;</property>
+                <style>
+                  <class name="procent-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">4</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_result_button">
+                <property name="label" translatable="1" comments="Label on the solve button (clicking this 
solves the displayed calculation)">=</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Calculate Result</property>
+                <property name="action_name">cal.solve</property>
+                <style>
+                  <class name="suggested-action"/>
+                </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">3</property>
+                  <property name="row-span">2</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_x_pow_y_button">
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Exponent [^ or **]</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;^&apos;</property>
                 <child>
-                  <object class="GtkArrow" id="arrow14">
-                    <property name="visible">True</property>
-                    <property name="arrow_type">down</property>
+                  <object class="GtkLabel" id="x_pow_y_label">
+                    <property 
name="label">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;&lt;i&gt;y&lt;/i&gt;&lt;/sup&gt;</property>
+                    <property name="use_markup">1</property>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">1</property>
-                  </packing>
                 </child>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">2</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_logarithm_button">
+                <property name="label">log</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Logarithm</property>
+                <property name="action_name">cal.insert-general</property>
+                <property name="action_target">&apos;log &apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">0</property>
+                </layout>
               </object>
             </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">4</property>
-            <property name="width">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_finc_compounding_term_button">
-            <property name="label" translatable="yes" comments="Calculates the number of compounding periods 
necessary to increase an investment of present value pv to a future value of fv, at a fixed interest rate of 
int per compounding period. See also: http://en.wikipedia.org/wiki/Compound_interest";>Ctrm</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Compounding Term</property>
-            <property name="action_name">cal.launch-finc-dialog</property>
-            <property name="action_target">'ctrm_dialog'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
           </object>
-          <packing>
-            <property name="left_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_finc_double_declining_depreciation_button">
-            <property name="label" translatable="yes" comments="Calculates the depreciation allowance on an 
asset for a specified period of time, using the double-declining balance method. See also: 
http://en.wikipedia.org/wiki/Depreciation";>Ddb</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Double Declining Depreciation</property>
-            <property name="action_name">cal.launch-finc-dialog</property>
-            <property name="action_target">'ddb_dialog'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_finc_future_value_button">
-            <property name="label" translatable="yes" comments="Calculates the future value of an investment 
based on a series of equal payments, each of amount pmt, at a periodic interest rate of int, over the number 
of payment periods in the term. See also: http://en.wikipedia.org/wiki/Future_value";>Fv</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Future Value</property>
-            <property name="action_name">cal.launch-finc-dialog</property>
-            <property name="action_target">'fv_dialog'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_finc_term_button">
-            <property name="label" translatable="yes" comments="Calculates the number of payment periods 
that are necessary during the term of an ordinary annuity, to accumulate a future value of fv, at a periodic 
interest rate of int. Each payment is equal to amount pmt. See also: 
http://en.wikipedia.org/wiki/Annuity_(finance_theory)">Term</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Financial Term</property>
-            <property name="action_name">cal.launch-finc-dialog</property>
-            <property name="action_target">'term_dialog'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_finc_sum_of_the_years_digits_depreciation_button">
-            <property name="label" translatable="yes" comments="Calculates the depreciation allowance on an 
asset for a specified period of time, using the Sum-Of-The-Years’-Digits method. This method of depreciation 
accelerates the rate of depreciation, so that more depreciation expense occurs in earlier periods than in 
later ones. The depreciable cost is cost - salvage. The useful life is the number of periods, typically 
years, over which an asset is depreciated. See also: http://en.wikipedia.org/wiki/Depreciation";>Syd</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Sum of the Years Digits Depreciation</property>
-            <property name="action_name">cal.launch-finc-dialog</property>
-            <property name="action_target">'syd_dialog'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_finc_straight_line_depreciation_button">
-            <property name="label" translatable="yes" comments="Calculates the straight-line depreciation of 
an asset for one period. The depreciable cost is cost - salvage. The straight-line method of depreciation 
divides the depreciable cost evenly over the useful life of an asset. The useful life is the number of 
periods, typically years, over which an asset is depreciated. See also: 
http://en.wikipedia.org/wiki/Depreciation";>Sln</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Straight Line Depreciation</property>
-            <property name="action_name">cal.launch-finc-dialog</property>
-            <property name="action_target">'sln_dialog'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_finc_periodic_interest_rate_button">
-            <property name="label" translatable="yes" comments="Calculates the periodic interest necessary 
to increase an investment of present value pv to a future value of fv, over the number of compounding periods 
in term. See also: http://en.wikipedia.org/wiki/Interest";>Rate</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Periodic Interest Rate</property>
-            <property name="action_name">cal.launch-finc-dialog</property>
-            <property name="action_target">'rate_dialog'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_finc_present_value_button">
-            <property name="label" translatable="yes" comments="Calculates the present value of an 
investment based on a series of equal payments, each of amount pmt, discounted at a periodic interest rate of 
int, over the number of payment periods in the term. See also: 
http://en.wikipedia.org/wiki/Present_value";>Pv</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Present Value</property>
-            <property name="action_name">cal.launch-finc-dialog</property>
-            <property name="action_target">'pv_dialog'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_finc_periodic_payment_button">
-            <property name="label" translatable="yes" comments="Calculates the amount of the periodic 
payment of a loan, where payments are made at the end of each payment period. See also: 
http://en.wikipedia.org/wiki/Amortization_schedule";>Pmt</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Periodic Payment</property>
-            <property name="action_name">cal.launch-finc-dialog</property>
-            <property name="action_target">'pmt_dialog'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_finc_gross_profit_margin_button">
-            <property name="label" translatable="yes" comments="Calculates the resale price of a product, 
based on the product cost and the wanted gross profit margin. See also: 
http://en.wikipedia.org/wiki/Gross_profit_margin";>Gpm</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Gross Profit Margin</property>
-            <property name="action_name">cal.launch-finc-dialog</property>
-            <property name="action_target">'gpm_dialog'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
+        </property>
       </object>
-      <packing>
+    </child>
+    <child>
+      <object class="AdwLeafletPage">
         <property name="name">advanced</property>
-      </packing>
+        <property name="child">
+          <object class="GtkGrid" id="advanced">
+            <property name="hexpand">True</property>
+            <property name="row-homogeneous">True</property>
+            <property name="column-homogeneous">True</property>
+            <property name="row_spacing">4</property>
+            <property name="column_spacing">4</property>
+            <child>
+              <object class="GtkMenuButton" id="calc_memory_button">
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Memory</property>
+                <property name="label" translatable="1" comments="The label on the memory 
button">x</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">4</property>
+                  <property name="column-span">3</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_finc_compounding_term_button">
+                <property name="label" translatable="1" comments="Calculates the number of compounding 
periods necessary to increase an investment of present value pv to a future value of fv, at a fixed interest 
rate of int per compounding period. See also: http://en.wikipedia.org/wiki/Compound_interest";>Ctrm</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Compounding Term</property>
+                <property name="action_name">cal.launch-finc-dialog</property>
+                <property name="action_target">&apos;ctrm_dialog&apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">0</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_finc_double_declining_depreciation_button">
+                <property name="label" translatable="1" comments="Calculates the depreciation allowance on 
an asset for a specified period of time, using the double-declining balance method. See also: 
http://en.wikipedia.org/wiki/Depreciation";>Ddb</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Double Declining Depreciation</property>
+                <property name="action_name">cal.launch-finc-dialog</property>
+                <property name="action_target">&apos;ddb_dialog&apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_finc_future_value_button">
+                <property name="label" translatable="1" comments="Calculates the future value of an 
investment based on a series of equal payments, each of amount pmt, at a periodic interest rate of int, over 
the number of payment periods in the term. See also: http://en.wikipedia.org/wiki/Future_value";>Fv</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Future Value</property>
+                <property name="action_name">cal.launch-finc-dialog</property>
+                <property name="action_target">&apos;fv_dialog&apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_finc_term_button">
+                <property name="label" translatable="1" comments="Calculates the number of payment periods 
that are necessary during the term of an ordinary annuity, to accumulate a future value of fv, at a periodic 
interest rate of int. Each payment is equal to amount pmt. See also: 
http://en.wikipedia.org/wiki/Annuity_(finance_theory)">Term</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Financial Term</property>
+                <property name="action_name">cal.launch-finc-dialog</property>
+                <property name="action_target">&apos;term_dialog&apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_finc_sum_of_the_years_digits_depreciation_button">
+                <property name="label" translatable="1" comments="Calculates the depreciation allowance on 
an asset for a specified period of time, using the Sum-Of-The-Years’-Digits method. This method of 
depreciation accelerates the rate of depreciation, so that more depreciation expense occurs in earlier 
periods than in later ones. The depreciable cost is cost - salvage. The useful life is the number of periods, 
typically years, over which an asset is depreciated. See also: 
http://en.wikipedia.org/wiki/Depreciation";>Syd</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Sum of the Years Digits 
Depreciation</property>
+                <property name="action_name">cal.launch-finc-dialog</property>
+                <property name="action_target">&apos;syd_dialog&apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">2</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_finc_straight_line_depreciation_button">
+                <property name="label" translatable="1" comments="Calculates the straight-line depreciation 
of an asset for one period. The depreciable cost is cost - salvage. The straight-line method of depreciation 
divides the depreciable cost evenly over the useful life of an asset. The useful life is the number of 
periods, typically years, over which an asset is depreciated. See also: 
http://en.wikipedia.org/wiki/Depreciation";>Sln</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Straight Line Depreciation</property>
+                <property name="action_name">cal.launch-finc-dialog</property>
+                <property name="action_target">&apos;sln_dialog&apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_finc_periodic_interest_rate_button">
+                <property name="label" translatable="1" comments="Calculates the periodic interest necessary 
to increase an investment of present value pv to a future value of fv, over the number of compounding periods 
in term. See also: http://en.wikipedia.org/wiki/Interest";>Rate</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Periodic Interest Rate</property>
+                <property name="action_name">cal.launch-finc-dialog</property>
+                <property name="action_target">&apos;rate_dialog&apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">2</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_finc_present_value_button">
+                <property name="label" translatable="1" comments="Calculates the present value of an 
investment based on a series of equal payments, each of amount pmt, discounted at a periodic interest rate of 
int, over the number of payment periods in the term. See also: 
http://en.wikipedia.org/wiki/Present_value";>Pv</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Present Value</property>
+                <property name="action_name">cal.launch-finc-dialog</property>
+                <property name="action_target">&apos;pv_dialog&apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">1</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_finc_periodic_payment_button">
+                <property name="label" translatable="1" comments="Calculates the amount of the periodic 
payment of a loan, where payments are made at the end of each payment period. See also: 
http://en.wikipedia.org/wiki/Amortization_schedule";>Pmt</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Periodic Payment</property>
+                <property name="action_name">cal.launch-finc-dialog</property>
+                <property name="action_target">&apos;pmt_dialog&apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_finc_gross_profit_margin_button">
+                <property name="label" translatable="1" comments="Calculates the resale price of a product, 
based on the product cost and the wanted gross profit margin. See also: 
http://en.wikipedia.org/wiki/Gross_profit_margin";>Gpm</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="tooltip_text" translatable="1">Gross Profit Margin</property>
+                <property name="action_name">cal.launch-finc-dialog</property>
+                <property name="action_target">&apos;gpm_dialog&apos;</property>
+                <style>
+                  <class name="function-button"/>
+                </style>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">1</property>
+                </layout>
+              </object>
+            </child>
+          </object>
+        </property>
+      </object>
     </child>
   </object>
   <object class="GtkSizeGroup">
-    <property name="mode">both</property>
+    <property name="mode">3</property>
     <widgets>
       <widget name="basic"/>
       <widget name="advanced"/>
     </widgets>
   </object>
-
-
 </interface>
diff --git a/src/ui/buttons-programming.ui b/src/ui/buttons-programming.ui
index 0d642853..2c3b8790 100644
--- a/src/ui/buttons-programming.ui
+++ b/src/ui/buttons-programming.ui
@@ -1,20 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-naming-policy toplevel-contextual -->
-  <requires lib="gtk+" version="3.16"/>
+  <requires lib="gtk" version="4.0"/>
+  <requires lib="gtk" version="4.0"/>
   <object class="GtkBox" id="button_panel">
-    <property name="visible">True</property>
     <property name="orientation">vertical</property>
     <child>
       <object class="GtkBox" id="hbox1">
-        <property name="visible">True</property>
-        <property name="orientation">horizontal</property>
         <style>
           <class name="converter"/>
         </style>
         <child>
           <object class="GtkComboBoxText" id="base_combo">
-            <property name="visible">True</property>
             <property name="focus_on_click">False</property>
             <items>
               <item id="2" translatable="yes">Binary</item>
@@ -25,56 +21,36 @@
           </object>
         </child>
         <child>
-          <object class="HdySqueezer">
+          <object class="AdwSqueezer">
+            <property name="hexpand">True</property>
             <property name="visible">True</property>
             <property name="transition-type">crossfade</property>
             <property name="xalign">0</property>
-        <child>
-          <object class="GtkLabel" id="base_label">
-            <property name="visible">True</property>
-            <property name="selectable">True</property>
-            <property name="can-focus">False</property>
-            <property name="halign">end</property>
-            <property name="label" comments="Example content">FF₁₆ 256₁₀</property>
-          </object>
-        </child>
+            <child>
+              <object class="GtkLabel" id="base_label">
+                <property name="selectable">1</property>
+                <property name="halign">2</property>
+                <property name="label" comments="Example content">FF₁₆ 256₁₀</property>
+              </object>
+            </child>
             <child>
               <object class="GtkBox">
-                <property name="visible">True</property>
               </object>
             </child>
           </object>
-          <packing>
-            <property name="expand">True</property>
-          </packing>
         </child>
         <child>
           <object class="GtkToggleButton" id="view_more_button">
-            <property name="can_focus">False</property>
-            <property name="receives_default">False</property>
-            <child>
-              <object class="GtkImage">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="icon_name">view-more-horizontal-symbolic</property>
-                <property name="icon_size">1</property>
-              </object>
-            </child>
+            <property name="icon_name">view-more-horizontal-symbolic</property>
             <style>
-              <class name="image-button"/>
               <class name="view-more-button"/>
             </style>
           </object>
         </child>
       </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="position">0</property>
-      </packing>
     </child>
     <child>
       <object class="GtkBox" id="bit_panel">
-        <property name="visible">True</property>
         <property name="orientation">vertical</property>
         <style>
           <class name="bit-panel"/>
@@ -82,2620 +58,2100 @@
         </style>
         <child>
           <object class="GtkGrid" id="bit_table">
-            <property name="visible">True</property>
-            <property name="halign">center</property>
+            <property name="halign">3</property>
             <child>
               <object class="GtkButton" id="toggle_bit_0_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">0</property>
-                <property name="tooltip_text" translatable="no">63</property>
+                <property name="tooltip_text" translatable="0">63</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_1_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">1</property>
-                <property name="tooltip_text" translatable="no">62</property>
+                <property name="tooltip_text" translatable="0">62</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_2_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">2</property>
-                <property name="tooltip_text" translatable="no">61</property>
+                <property name="tooltip_text" translatable="0">61</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_3_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="margin_end">10</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">3</property>
-                <property name="tooltip_text" translatable="no">60</property>
+                <property name="tooltip_text" translatable="0">60</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">4</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">4</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_4_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">4</property>
-                <property name="tooltip_text" translatable="no">59</property>
+                <property name="tooltip_text" translatable="0">59</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">5</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">5</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_5_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">5</property>
-                <property name="tooltip_text" translatable="no">58</property>
+                <property name="tooltip_text" translatable="0">58</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">6</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">6</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_6_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">6</property>
-                <property name="tooltip_text" translatable="no">57</property>
+                <property name="tooltip_text" translatable="0">57</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">7</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">7</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_7_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="margin_end">10</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">7</property>
-                <property name="tooltip_text" translatable="no">56</property>
+                <property name="tooltip_text" translatable="0">56</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">8</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">8</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_8_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">8</property>
-                <property name="tooltip_text" translatable="no">55</property>
+                <property name="tooltip_text" translatable="0">55</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">9</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">9</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_9_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">9</property>
-                <property name="tooltip_text" translatable="no">54</property>
+                <property name="tooltip_text" translatable="0">54</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">10</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">10</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_10_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">10</property>
-                <property name="tooltip_text" translatable="no">53</property>
+                <property name="tooltip_text" translatable="0">53</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">11</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">11</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_11_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="margin_end">10</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">11</property>
-                <property name="tooltip_text" translatable="no">52</property>
+                <property name="tooltip_text" translatable="0">52</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">12</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">12</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_12_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">12</property>
-                <property name="tooltip_text" translatable="no">51</property>
+                <property name="tooltip_text" translatable="0">51</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">13</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">13</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_13_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">13</property>
-                <property name="tooltip_text" translatable="no">50</property>
+                <property name="tooltip_text" translatable="0">50</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">14</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">14</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_14_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">14</property>
-                <property name="tooltip_text" translatable="no">49</property>
+                <property name="tooltip_text" translatable="0">49</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">15</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">15</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_15_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">15</property>
-                <property name="tooltip_text" translatable="no">48</property>
+                <property name="tooltip_text" translatable="0">48</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">16</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">16</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_31_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">31</property>
-                <property name="tooltip_text" translatable="no">32</property>
+                <property name="tooltip_text" translatable="0">32</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">16</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">16</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_30_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">30</property>
-                <property name="tooltip_text" translatable="no">33</property>
+                <property name="tooltip_text" translatable="0">33</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">15</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">15</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_29_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">29</property>
-                <property name="tooltip_text" translatable="no">34</property>
+                <property name="tooltip_text" translatable="0">34</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">14</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">14</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_28_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">28</property>
-                <property name="tooltip_text" translatable="no">35</property>
+                <property name="tooltip_text" translatable="0">35</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">13</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">13</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_27_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="margin_end">10</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">27</property>
-                <property name="tooltip_text" translatable="no">36</property>
+                <property name="tooltip_text" translatable="0">36</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">12</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">12</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_26_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">26</property>
-                <property name="tooltip_text" translatable="no">37</property>
+                <property name="tooltip_text" translatable="0">37</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">11</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">11</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_25_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">25</property>
-                <property name="tooltip_text" translatable="no">38</property>
+                <property name="tooltip_text" translatable="0">38</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">10</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">10</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_24_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">24</property>
-                <property name="tooltip_text" translatable="no">39</property>
+                <property name="tooltip_text" translatable="0">39</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">9</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">9</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_23_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="margin_end">10</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">23</property>
-                <property name="tooltip_text" translatable="no">40</property>
+                <property name="tooltip_text" translatable="0">40</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">8</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">8</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_22_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">22</property>
-                <property name="tooltip_text" translatable="no">41</property>
+                <property name="tooltip_text" translatable="0">41</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">7</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">7</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_21_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">21</property>
-                <property name="tooltip_text" translatable="no">42</property>
+                <property name="tooltip_text" translatable="0">42</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">6</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">6</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_20_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">20</property>
-                <property name="tooltip_text" translatable="no">43</property>
+                <property name="tooltip_text" translatable="0">43</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">5</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">5</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_19_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="margin_end">10</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">19</property>
-                <property name="tooltip_text" translatable="no">44</property>
+                <property name="tooltip_text" translatable="0">44</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">4</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_18_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">18</property>
-                <property name="tooltip_text" translatable="no">45</property>
+                <property name="tooltip_text" translatable="0">45</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">3</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_17_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">17</property>
-                <property name="tooltip_text" translatable="no">46</property>
+                <property name="tooltip_text" translatable="0">46</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_16_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">16</property>
-                <property name="tooltip_text" translatable="no">47</property>
+                <property name="tooltip_text" translatable="0">47</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="bit_marker_label0">
-                <property name="visible">True</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="label">63</property>
-                <property name="justify">center</property>
+                <property name="justify">2</property>
                 <style>
                   <class name="dim-label"/>
                   <class name="bit-marker-label"/>
                 </style>
+                <layout>
+                  <property name="column">0</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="bit_marker_label3">
-                <property name="visible">True</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="label">31</property>
-                <property name="justify">center</property>
+                <property name="justify">2</property>
                 <style>
                   <class name="dim-label"/>
                   <class name="bit-marker-label"/>
                 </style>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel">
-                <property name="visible">True</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="label">48</property>
-                <property name="justify">center</property>
+                <property name="justify">2</property>
                 <style>
                   <class name="dim-label"/>
                   <class name="bit-marker-label"/>
                 </style>
+                <layout>
+                  <property name="column">17</property>
+                  <property name="row">0</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">17</property>
-                <property name="top_attach">0</property>
-                <property name="width">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="bit_marker_label2">
-                <property name="visible">True</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="label">32</property>
-                <property name="justify">center</property>
+                <property name="justify">2</property>
                 <style>
                   <class name="dim-label"/>
                   <class name="bit-marker-label"/>
                 </style>
+                <layout>
+                  <property name="column">17</property>
+                  <property name="row">1</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">17</property>
-                <property name="top_attach">1</property>
-                <property name="width">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel">
-                <property name="visible">True</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="label">16</property>
-                <property name="justify">center</property>
+                <property name="justify">2</property>
                 <style>
                   <class name="dim-label"/>
                   <class name="bit-marker-label"/>
                 </style>
+                <layout>
+                  <property name="column">17</property>
+                  <property name="row">2</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">17</property>
-                <property name="top_attach">2</property>
-                <property name="width">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="bit_marker_label5">
-                <property name="visible">True</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="label"> 0</property>
-                <property name="justify">center</property>
+                <property name="justify">2</property>
                 <style>
                   <class name="dim-label"/>
                   <class name="bit-marker-label"/>
                 </style>
+                <layout>
+                  <property name="column">17</property>
+                  <property name="row">3</property>
+                  <property name="column-span">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">17</property>
-                <property name="top_attach">3</property>
-                <property name="width">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_32_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">32</property>
-                <property name="tooltip_text" translatable="no">31</property>
+                <property name="tooltip_text" translatable="0">31</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_33_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">33</property>
-                <property name="tooltip_text" translatable="no">30</property>
+                <property name="tooltip_text" translatable="0">30</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_34_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">34</property>
-                <property name="tooltip_text" translatable="no">29</property>
+                <property name="tooltip_text" translatable="0">29</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">3</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_35_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="margin_end">10</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">35</property>
-                <property name="tooltip_text" translatable="no">28</property>
+                <property name="tooltip_text" translatable="0">28</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">4</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_36_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">36</property>
-                <property name="tooltip_text" translatable="no">27</property>
+                <property name="tooltip_text" translatable="0">27</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">5</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">5</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_37_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">37</property>
-                <property name="tooltip_text" translatable="no">26</property>
+                <property name="tooltip_text" translatable="0">26</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">6</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">6</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_38_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">38</property>
-                <property name="tooltip_text" translatable="no">25</property>
+                <property name="tooltip_text" translatable="0">25</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">7</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">7</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_39_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="margin_end">10</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">39</property>
-                <property name="tooltip_text" translatable="no">24</property>
+                <property name="tooltip_text" translatable="0">24</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">8</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">8</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_40_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">40</property>
-                <property name="tooltip_text" translatable="no">23</property>
+                <property name="tooltip_text" translatable="0">23</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">9</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">9</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_41_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">41</property>
-                <property name="tooltip_text" translatable="no">22</property>
+                <property name="tooltip_text" translatable="0">22</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">10</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">10</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_42_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">42</property>
-                <property name="tooltip_text" translatable="no">21</property>
+                <property name="tooltip_text" translatable="0">21</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">11</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">11</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_43_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="margin_end">10</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">43</property>
-                <property name="tooltip_text" translatable="no">20</property>
+                <property name="tooltip_text" translatable="0">20</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">12</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">12</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_44_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">44</property>
-                <property name="tooltip_text" translatable="no">19</property>
+                <property name="tooltip_text" translatable="0">19</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">13</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">13</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_45_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">45</property>
-                <property name="tooltip_text" translatable="no">18</property>
+                <property name="tooltip_text" translatable="0">18</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">14</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">14</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_46_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">46</property>
-                <property name="tooltip_text" translatable="no">17</property>
+                <property name="tooltip_text" translatable="0">17</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">15</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">15</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_47_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">47</property>
-                <property name="tooltip_text" translatable="no">16</property>
+                <property name="tooltip_text" translatable="0">16</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">16</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">16</property>
-                <property name="top_attach">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_48_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">48</property>
-                <property name="tooltip_text" translatable="no">15</property>
+                <property name="tooltip_text" translatable="0">15</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_49_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">49</property>
-                <property name="tooltip_text" translatable="no">14</property>
+                <property name="tooltip_text" translatable="0">14</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">2</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_50_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">50</property>
-                <property name="tooltip_text" translatable="no">13</property>
+                <property name="tooltip_text" translatable="0">13</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">3</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">3</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_51_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="margin_end">10</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">51</property>
-                <property name="tooltip_text" translatable="no">12</property>
+                <property name="tooltip_text" translatable="0">12</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">4</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">4</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_52_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">52</property>
-                <property name="tooltip_text" translatable="no">11</property>
+                <property name="tooltip_text" translatable="0">11</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">5</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">5</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_53_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">53</property>
-                <property name="tooltip_text" translatable="no">10</property>
+                <property name="tooltip_text" translatable="0">10</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">6</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">6</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_54_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">54</property>
-                <property name="tooltip_text" translatable="no">9</property>
+                <property name="tooltip_text" translatable="0">9</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">7</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">7</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_55_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="margin_end">10</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">55</property>
-                <property name="tooltip_text" translatable="no">8</property>
+                <property name="tooltip_text" translatable="0">8</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">8</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">8</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_56_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">56</property>
-                <property name="tooltip_text" translatable="no">7</property>
+                <property name="tooltip_text" translatable="0">7</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">9</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">9</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_57_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">57</property>
-                <property name="tooltip_text" translatable="no">6</property>
+                <property name="tooltip_text" translatable="0">6</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">10</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">10</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_58_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">58</property>
-                <property name="tooltip_text" translatable="no">5</property>
+                <property name="tooltip_text" translatable="0">5</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">11</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">11</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_59_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="margin_end">10</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">59</property>
-                <property name="tooltip_text" translatable="no">4</property>
+                <property name="tooltip_text" translatable="0">4</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">12</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">12</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_60_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">60</property>
-                <property name="tooltip_text" translatable="no">3</property>
+                <property name="tooltip_text" translatable="0">3</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">13</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">13</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_61_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">61</property>
-                <property name="tooltip_text" translatable="no">2</property>
+                <property name="tooltip_text" translatable="0">2</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">14</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">14</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_62_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">62</property>
-                <property name="tooltip_text" translatable="no">1</property>
+                <property name="tooltip_text" translatable="0">1</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">15</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">15</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton" id="toggle_bit_63_button">
-                <property name="visible">True</property>
                 <property name="label">0</property>
-                <property name="can_focus">False</property>
                 <property name="action_name">cal.toggle-bit</property>
                 <property name="action_target">63</property>
-                <property name="tooltip_text" translatable="no">0</property>
+                <property name="tooltip_text" translatable="0">0</property>
                 <style>
-                  <class name="bit-toggle-button" />
-                  <class name="flat" />
+                  <class name="bit-toggle-button"/>
+                  <class name="flat"/>
                 </style>
+                <layout>
+                  <property name="column">16</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">16</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="bit_marker_label1">
-                <property name="visible">True</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="label">47</property>
-                <property name="justify">center</property>
+                <property name="justify">2</property>
                 <style>
                   <class name="dim-label"/>
                   <class name="bit-marker-label"/>
                 </style>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="bit_marker_label4">
-                <property name="visible">True</property>
-                <property name="halign">start</property>
+                <property name="halign">1</property>
                 <property name="label">15</property>
-                <property name="justify">center</property>
+                <property name="justify">2</property>
                 <style>
                   <class name="dim-label"/>
                   <class name="bit-marker-label"/>
                 </style>
+                <layout>
+                  <property name="column">0</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">3</property>
-              </packing>
             </child>
           </object>
         </child>
       </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="position">1</property>
-      </packing>
     </child>
     <child>
-      <object class="HdyLeaflet" id="leaflet">
+      <object class="AdwLeaflet" id="leaflet">
         <property name="visible">True</property>
         <property name="can-swipe-back">True</property>
         <property name="can-swipe-forward">True</property>
         <property name="transition-type">slide</property>
         <property name="visible-child">basic</property>
-    <child>
-      <object class="GtkGrid" id="basic">
-        <property name="visible">True</property>
-        <property name="hexpand">true</property>
-        <property name="row-homogeneous">True</property>
-        <property name="column-homogeneous">True</property>
-        <property name="row_spacing">4</property>
-        <property name="column_spacing">4</property>
         <child>
-          <object class="GtkButton" id="calc_root_button">
-            <property name="label">√</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Root [Ctrl+R]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'√'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_pi_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Pi [Ctrl+P]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'π'</property>
-            <child>
-              <object class="GtkLabel" id="pi_label">
-                <property name="visible">True</property>
-                <property name="label">π</property>
-                <property name="use_markup">True</property>
+          <object class="AdwLeafletPage">
+            <property name="name">basic</property>
+            <property name="child">
+              <object class="GtkGrid" id="basic">
+                <property name="hexpand">True</property>
+                <property name="row-homogeneous">True</property>
+                <property name="column-homogeneous">True</property>
+                <property name="row_spacing">4</property>
+                <property name="column_spacing">4</property>
+                <child>
+                  <object class="GtkButton" id="calc_root_button">
+                    <property name="label">√</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Root [Ctrl+R]</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;√&apos;</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">4</property>
+                      <property name="row">1</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_pi_button">
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Pi [Ctrl+P]</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;π&apos;</property>
+                    <child>
+                      <object class="GtkLabel" id="pi_label">
+                        <property name="label">π</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">4</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_divide_button">
+                    <property name="label">÷</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Divide [/]</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;÷&apos;</property>
+                    <style>
+                      <class name="operator-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">3</property>
+                      <property name="row">1</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_multiply_button">
+                    <property name="label">×</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Multiply [*]</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;×&apos;</property>
+                    <style>
+                      <class name="operator-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">3</property>
+                      <property name="row">2</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_subtract_button">
+                    <property name="label">−</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Subtract [-]</property>
+                    <property name="action_name">cal.subtract</property>
+                    <style>
+                      <class name="operator-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">3</property>
+                      <property name="row">3</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_add_button">
+                    <property name="label">+</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Add [+]</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;+&apos;</property>
+                    <style>
+                      <class name="operator-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">3</property>
+                      <property name="row">4</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_result_button">
+                    <property name="label" translatable="1" comments="Label on the solve button (clicking 
this solves the displayed calculation)">=</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Calculate Result</property>
+                    <property name="action_name">cal.solve</property>
+                    <style>
+                      <class name="suggested-action"/>
+                    </style>
+                    <layout>
+                      <property name="column">4</property>
+                      <property name="row">3</property>
+                      <property name="row-span">2</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_clear_button">
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Clear Display [Escape]</property>
+                    <property name="action_name">cal.clear</property>
+                    <property name="icon_name">edit-clear-symbolic</property>
+                    <style>
+                      <class name="destructive-action"/>
+                      <class name="clear-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">0</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkGrid">
+                    <property name="row-homogeneous">True</property>
+                    <property name="column-homogeneous">True</property>
+                    <property name="row_spacing">4</property>
+                    <property name="column_spacing">4</property>
+                    <child>
+                      <object class="GtkButton" id="calc_0_button">
+                        <property name="label">0</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">0</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">0</property>
+                          <property name="row">3</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_1_button">
+                        <property name="label">1</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">1</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">1</property>
+                          <property name="row">3</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_2_button">
+                        <property name="label">2</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">2</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">2</property>
+                          <property name="row">3</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_3_button">
+                        <property name="label">3</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">3</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">3</property>
+                          <property name="row">3</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_4_button">
+                        <property name="label">4</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">4</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">0</property>
+                          <property name="row">2</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_5_button">
+                        <property name="label">5</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">5</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">1</property>
+                          <property name="row">2</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_6_button">
+                        <property name="label">6</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">6</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">2</property>
+                          <property name="row">2</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_7_button">
+                        <property name="label">7</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">7</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">3</property>
+                          <property name="row">2</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_8_button">
+                        <property name="label">8</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">8</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">0</property>
+                          <property name="row">1</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_9_button">
+                        <property name="label">9</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">9</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">1</property>
+                          <property name="row">1</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_10_button">
+                        <property name="label">A</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">10</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">2</property>
+                          <property name="row">1</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_11_button">
+                        <property name="label">B</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">11</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">3</property>
+                          <property name="row">1</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_12_button">
+                        <property name="label">C</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">12</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">0</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_13_button">
+                        <property name="label">D</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">13</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">1</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_14_button">
+                        <property name="label">E</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">14</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">2</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="calc_15_button">
+                        <property name="label">F</property>
+                        <property name="use_underline">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="action_name">cal.insert-digit</property>
+                        <property name="action_target">15</property>
+                        <style>
+                          <class name="number-button"/>
+                        </style>
+                        <layout>
+                          <property name="column">3</property>
+                        </layout>
+                      </object>
+                    </child>
+                    <layout>
+                      <property name="column">0</property>
+                      <property name="row">1</property>
+                      <property name="column-span">3</property>
+                      <property name="row-span">4</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_numeric_point_button">
+                    <property name="label" comments="Label is set in gtk.c to comply with LC 
flags">.</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="action_name">cal.insert-numeric-point</property>
+                    <style>
+                      <class name="numeric-point-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">4</property>
+                      <property name="row">2</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_modulus_divide_button">
+                    <property name="label">mod</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Modulus divide</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos; mod &apos;</property>
+                    <style>
+                      <class name="operator-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">3</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_start_group_button">
+                    <property name="label">(</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Start Group [(]</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;(&apos;</property>
+                    <style>
+                      <class name="parenthesis-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">1</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_end_group_button">
+                    <property name="label">)</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">End Group [)]</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;)&apos;</property>
+                    <style>
+                      <class name="parenthesis-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">2</property>
+                    </layout>
+                  </object>
+                </child>
               </object>
-            </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_divide_button">
-            <property name="label">÷</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Divide [/]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'÷'</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_multiply_button">
-            <property name="label">×</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Multiply [*]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'×'</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_subtract_button">
-            <property name="label">−</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Subtract [-]</property>
-            <property name="action_name">cal.subtract</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_add_button">
-            <property name="label">+</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Add [+]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'+'</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
+            </property>
           </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">4</property>
-          </packing>
         </child>
         <child>
-          <object class="GtkButton" id="calc_result_button">
-            <property name="label" translatable="yes" comments="Label on the solve button (clicking this 
solves the displayed calculation)">=</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Calculate Result</property>
-            <property name="action_name">cal.solve</property>
-            <style>
-              <class name="suggested-action"/>
-            </style>
+          <object class="AdwLeafletPage">
+            <property name="name">advanced</property>
+            <property name="child">
+              <object class="GtkGrid" id="advanced">
+                <property name="hexpand">True</property>
+                <property name="row-homogeneous">True</property>
+                <property name="column-homogeneous">True</property>
+                <property name="row_spacing">4</property>
+                <property name="column_spacing">4</property>
+                <child>
+                  <object class="GtkToggleButton" id="calc_subscript_button">
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Subscript mode [Alt]</property>
+                    <property name="action_name">cal.set-number-mode</property>
+                    <property name="action_target">&apos;subscript&apos;</property>
+                    <child>
+                      <object class="GtkLabel" id="label4">
+                        <property name="label">↓n</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">5</property>
+                      <property name="row">0</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="calc_superscript_button">
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Superscript mode [Ctrl]</property>
+                    <property name="action_name">cal.set-number-mode</property>
+                    <property name="action_target">&apos;superscript&apos;</property>
+                    <child>
+                      <object class="GtkLabel" id="label3">
+                        <property name="label">↑n</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">6</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuButton" id="calc_shift_left_button">
+                    <property name="focus_on_click">False</property>
+                    <property name="label">&lt;&lt;</property>
+                    <property name="tooltip_text" translatable="1">Shift Left</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">7</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuButton" id="calc_shift_right_button">
+                    <property name="focus_on_click">False</property>
+                    <property name="label">&gt;&gt;</property>
+                    <property name="tooltip_text" translatable="1">Shift Right</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">8</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_xor_button">
+                    <property name="label">XOR</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Boolean Exclusive OR</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;⊻&apos;</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">9</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_or_button">
+                    <property name="label">OR</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Boolean OR</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;∨&apos;</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">9</property>
+                      <property name="row">1</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_and_button">
+                    <property name="label">AND</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Boolean AND</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;∧&apos;</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">8</property>
+                      <property name="row">1</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_not_button">
+                    <property name="label">NOT</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Boolean NOT</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;¬&apos;</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">7</property>
+                      <property name="row">1</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_ones_complement_button">
+                    <property name="label">ones</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Ones’ Complement</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;ones &apos;</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">5</property>
+                      <property name="row">1</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_twos_complement_button">
+                    <property name="label">twos</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Two’s Complement</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;twos &apos;</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">6</property>
+                      <property name="row">1</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_x_pow_y_button">
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Exponent [^ or **]</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;^&apos;</property>
+                    <child>
+                      <object class="GtkLabel" id="x_pow_y_label">
+                        <property 
name="label">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;&lt;i&gt;y&lt;/i&gt;&lt;/sup&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">5</property>
+                      <property name="row">2</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_inverse_button">
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Inverse [Ctrl+I]</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;⁻¹&apos;</property>
+                    <child>
+                      <object class="GtkLabel" id="label20">
+                        <property name="label">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;−1&lt;/sup&gt;</property>
+                        <property name="use_markup">True</property>
+                        <property name="justify">2</property>
+                      </object>
+                    </child>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">6</property>
+                      <property name="row">2</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_logarithm_button">
+                    <property name="label">log</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Logarithm</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;log &apos;</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">9</property>
+                      <property name="row">2</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_binary_logarithm_button">
+                    <property name="label">log₂</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Binary Logarithm</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;log₂ &apos;</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">8</property>
+                      <property name="row">2</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_factorial_button">
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Factorial [!]</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;!&apos;</property>
+                    <child>
+                      <object class="GtkLabel" id="label14">
+                        <property name="label">&lt;i&gt;x&lt;/i&gt;!</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">5</property>
+                      <property name="row">3</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_abs_button">
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Absolute Value [|]</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;|&apos;</property>
+                    <child>
+                      <object class="GtkLabel" id="label1">
+                        <property name="label">|&lt;i&gt;x&lt;/i&gt;|</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">6</property>
+                      <property name="row">3</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_integer_portion_button">
+                    <property name="label">int</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Integer Component</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;int &apos;</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">7</property>
+                      <property name="row">2</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_fractional_portion_button">
+                    <property name="label">frac</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Fractional Component</property>
+                    <property name="action_name">cal.insert-general</property>
+                    <property name="action_target">&apos;frac &apos;</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">7</property>
+                      <property name="row">3</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_factor_button">
+                    <property name="label">fact</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Factorize [Ctrl+F]</property>
+                    <property name="action_name">cal.factorize</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">7</property>
+                      <property name="row">4</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_character_button">
+                    <property name="label">á</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="tooltip_text" translatable="1">Insert Character Code</property>
+                    <property name="action_name">cal.insert-character</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">8</property>
+                      <property name="row">3</property>
+                      <property name="column-span">2</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuButton" id="calc_memory_button">
+                    <property name="focus_on_click">False</property>
+                    <property name="label" translatable="1" comments="The label on the memory 
button">x</property>
+                    <property name="tooltip_text" translatable="1">Memory</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">5</property>
+                      <property name="row">4</property>
+                      <property name="column-span">2</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuButton" id="calc_word_size_button">
+                    <property name="focus_on_click">False</property>
+                    <property name="label">64-bit</property>
+                    <property name="tooltip_text" translatable="1">Change word size</property>
+                    <style>
+                      <class name="function-button"/>
+                    </style>
+                    <layout>
+                      <property name="column">8</property>
+                      <property name="row">4</property>
+                      <property name="column-span">2</property>
+                    </layout>
+                  </object>
+                </child>
+              </object>
+            </property>
           </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">3</property>
-            <property name="height">2</property>
-          </packing>
         </child>
+        <style>
+          <class name="math-buttons"/>
+          <class name="buttons-programming"/>
+        </style>
+      </object>
+    </child>
+  </object>
+  <object class="GtkDialog" id="character_code_dialog">
+    <property name="title" translatable="1" comments="Title of insert character code dialog">Insert 
Character Code</property>
+    <property name="resizable">0</property>
+    <child internal-child="content_area">
+      <object class="GtkBox" id="dialog-vbox3">
+        <property name="orientation">vertical</property>
         <child>
-          <object class="GtkButton" id="calc_clear_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Clear Display [Escape]</property>
-            <property name="action_name">cal.clear</property>
+          <object class="GtkBox" id="hbox21">
+            <property name="margin_start">5</property>
+            <property name="margin_end">5</property>
+            <property name="margin_top">5</property>
+            <property name="margin_bottom">5</property>
+            <child>
+              <object class="GtkLabel" id="label39">
+                <property name="halign">3</property>
+                <property name="label" translatable="1" comments="Insert ASCII dialog: Label before 
character entry">Ch_aracter:</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">character_code_entry</property>
+              </object>
+            </child>
             <child>
-              <object class="GtkImage" id="calc_clear_icon">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="icon_name">edit-clear-symbolic</property>
+              <object class="GtkEntry" id="character_code_entry">
+                <property name="halign">3</property>
+                <property name="max_length">1</property>
               </object>
             </child>
-            <style>
-              <class name="destructive-action"/>
-              <class name="image-button"/>
-              <class name="clear-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkGrid">
-            <property name="visible">True</property>
-            <property name="row-homogeneous">True</property>
-            <property name="column-homogeneous">True</property>
-            <property name="row_spacing">4</property>
-            <property name="column_spacing">4</property>
-        <child>
-          <object class="GtkButton" id="calc_0_button">
-            <property name="label">0</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">0</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_1_button">
-            <property name="label">1</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">1</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_2_button">
-            <property name="label">2</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">2</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_3_button">
-            <property name="label">3</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">3</property>
-            <style>
-              <class name="number-button"/>
-            </style>
           </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">3</property>
-          </packing>
         </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-6">button8</action-widget>
+      <action-widget response="-5">button9</action-widget>
+    </action-widgets>
+    <child internal-child="action_area">
+      <object class="GtkBox" id="dialog-action_area3">
+        <property name="halign">2</property>
         <child>
-          <object class="GtkButton" id="calc_4_button">
-            <property name="label">4</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
+          <object class="GtkButton" id="button8">
+            <property name="label" translatable="1">_Cancel</property>
             <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">4</property>
-            <style>
-              <class name="number-button"/>
-            </style>
           </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">2</property>
-          </packing>
         </child>
         <child>
-          <object class="GtkButton" id="calc_5_button">
-            <property name="label">5</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
+          <object class="GtkButton" id="button9">
+            <property name="label" translatable="1" comments="Insert ASCII dialog: Button to insert selected 
character">_Insert</property>
             <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">5</property>
-            <style>
-              <class name="number-button"/>
-            </style>
           </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_6_button">
-            <property name="label">6</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">6</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_7_button">
-            <property name="label">7</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">7</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_8_button">
-            <property name="label">8</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">8</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_9_button">
-            <property name="label">9</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">9</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_10_button">
-            <property name="label">A</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">10</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_11_button">
-            <property name="label">B</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">11</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_12_button">
-            <property name="label">C</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">12</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_13_button">
-            <property name="label">D</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">13</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_14_button">
-            <property name="label">E</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">14</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_15_button">
-            <property name="label">F</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-digit</property>
-            <property name="action_target">15</property>
-            <style>
-              <class name="number-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-          </packing>
-        </child>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">1</property>
-            <property name="width">3</property>
-            <property name="height">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_numeric_point_button">
-            <property name="label" comments="Label is set in gtk.c to comply with LC flags">.</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="action_name">cal.insert-numeric-point</property>
-            <style>
-              <class name="numeric-point-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_modulus_divide_button">
-            <property name="label">mod</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Modulus divide</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">' mod '</property>
-            <style>
-              <class name="operator-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_start_group_button">
-            <property name="label">(</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Start Group [(]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'('</property>
-            <style>
-              <class name="parenthesis-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_end_group_button">
-            <property name="label">)</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">End Group [)]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">')'</property>
-            <style>
-              <class name="parenthesis-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-          </packing>
         </child>
       </object>
-      <packing>
-        <property name="name">basic</property>
-      </packing>
     </child>
-    <child>
-      <object class="GtkGrid" id="advanced">
-        <property name="visible">True</property>
-        <property name="hexpand">true</property>
-        <property name="row-homogeneous">True</property>
-        <property name="column-homogeneous">True</property>
-        <property name="row_spacing">4</property>
-        <property name="column_spacing">4</property>
-        <child>
-          <object class="GtkToggleButton" id="calc_subscript_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Subscript mode [Alt]</property>
-            <property name="action_name">cal.set-number-mode</property>
-            <property name="action_target">'subscript'</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_subscript_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the subscript mode button">Subscript</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label4">
-                <property name="visible">True</property>
-                <property name="label">↓n</property>
-                <property name="use_markup">True</property>
-              </object>
-            </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">5</property>
-            <property name="top_attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkToggleButton" id="calc_superscript_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Superscript mode [Ctrl]</property>
-            <property name="action_name">cal.set-number-mode</property>
-            <property name="action_target">'superscript'</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_superscript_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the superscript mode button">Superscript</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label3">
-                <property name="visible">True</property>
-                <property name="label">↑n</property>
-                <property name="use_markup">True</property>
-              </object>
-            </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">6</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkMenuButton" id="calc_shift_left_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Shift Left</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_shift_left_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the shift left button">Shift Left</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkBox" id="hbox11">
-                <property name="visible">True</property>
-                <property name="spacing">3</property>
-                <property name="orientation">horizontal</property>
-                <child>
-                  <object class="GtkLabel" id="label7">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hexpand">true</property>
-                    <property name="label">&lt;&lt;</property>
-                  </object>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkArrow" id="arrow5">
-                    <property name="visible">True</property>
-                    <property name="arrow_type">down</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </object>
-            </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">7</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkMenuButton" id="calc_shift_right_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Shift Right</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_shift_right_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the shift right button">Shift Right</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkBox" id="hbox10">
-                <property name="visible">True</property>
-                <property name="spacing">3</property>
-                <property name="orientation">horizontal</property>
-                <child>
-                  <object class="GtkLabel" id="label6">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hexpand">true</property>
-                    <property name="label">&gt;&gt;</property>
-                  </object>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkArrow" id="arrow4">
-                    <property name="visible">True</property>
-                    <property name="arrow_type">down</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </object>
-            </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">8</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_xor_button">
-            <property name="label">XOR</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Boolean Exclusive OR</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'⊻'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">9</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_or_button">
-            <property name="label">OR</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Boolean OR</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'∨'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">9</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_and_button">
-            <property name="label">AND</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Boolean AND</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'∧'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">8</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_not_button">
-            <property name="label">NOT</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Boolean NOT</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'¬'</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">7</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_ones_complement_button">
-            <property name="label">ones</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Ones’ Complement</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'ones '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">5</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_twos_complement_button">
-            <property name="label">twos</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Two’s Complement</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'twos '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">6</property>
-            <property name="top_attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_x_pow_y_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Exponent [^ or **]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'^'</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_x_pow_y_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the exponentiation (x to the power of y) button">Exponent</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkLabel" id="x_pow_y_label">
-                <property name="visible">True</property>
-                <property 
name="label">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;&lt;i&gt;y&lt;/i&gt;&lt;/sup&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-            </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">5</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_inverse_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Inverse [Ctrl+I]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'⁻¹'</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_inverse_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the inverse button">Inverse</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label20">
-                <property name="visible">True</property>
-                <property name="label">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;−1&lt;/sup&gt;</property>
-                <property name="use_markup">True</property>
-                <property name="justify">center</property>
-              </object>
-            </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">6</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_logarithm_button">
-            <property name="label">log</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Logarithm</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'log '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">9</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_binary_logarithm_button">
-            <property name="label">log₂</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Binary Logarithm</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'log₂ '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">8</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_factorial_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Factorial [!]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'!'</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_factorial_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the factorial button">Factorial</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label14">
-                <property name="visible">True</property>
-                <property name="label">&lt;i&gt;x&lt;/i&gt;!</property>
-                <property name="use_markup">True</property>
-              </object>
-            </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">5</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_abs_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Absolute Value [|]</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'|'</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_abs_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the absolute value button">Absolute Value</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label1">
-                <property name="visible">True</property>
-                <property name="label">|&lt;i&gt;x&lt;/i&gt;|</property>
-                <property name="use_markup">True</property>
-              </object>
-            </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">6</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_integer_portion_button">
-            <property name="label">int</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Integer Component</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'int '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">7</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_fractional_portion_button">
-            <property name="label">frac</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Fractional Component</property>
-            <property name="action_name">cal.insert-general</property>
-            <property name="action_target">'frac '</property>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">7</property>
-            <property name="top_attach">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_factor_button">
-            <property name="label">fact</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="use_underline">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Factorize [Ctrl+F]</property>
-            <property name="action_name">cal.factorize</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_factor_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the factorize button">Factorize</property>
-              </object>
-            </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">7</property>
-            <property name="top_attach">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="calc_character_button">
-            <property name="label">á</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Insert Character Code</property>
-            <property name="action_name">cal.insert-character</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_character_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the insert character button">Insert Character</property>
-              </object>
-            </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">8</property>
-            <property name="top_attach">3</property>
-            <property name="width">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkMenuButton" id="calc_memory_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="tooltip_text" translatable="yes">Memory</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_store_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the store value button">Store</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkBox" id="hbox20">
-                <property name="visible">True</property>
-                <property name="spacing">3</property>
-                <property name="orientation">horizontal</property>
-                <child>
-                  <object class="GtkLabel" id="label23">
-                    <property name="visible">True</property>
-                    <property name="hexpand">true</property>
-                    <property name="label" translatable="yes" comments="The label on the memory 
button">x</property>
-                  </object>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkArrow" id="arrow14">
-                    <property name="visible">True</property>
-                    <property name="arrow_type">down</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </object>
-            </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">5</property>
-            <property name="top_attach">4</property>
-            <property name="width">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkMenuButton" id="calc_word_size_button">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="focus_on_click">False</property>
-            <property name="receives_default">True</property>
-            <property name="tooltip_text" translatable="yes">Change word size</property>
-            <child>
-              <object class="GtkBox" id="hbox2">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="spacing">3</property>
-                <property name="orientation">horizontal</property>
-                <child>
-                  <object class="GtkLabel" id="word_size_label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="hexpand">true</property>
-                    <property name="label">64-bit</property>
-                  </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkArrow" id="arrow1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="arrow_type">down</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </object>
-            </child>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="calc_word_size_button-atkobject">
-                <property name="AtkObject::accessible-name" translatable="yes">Word Size</property>
-              </object>
-            </child>
-            <style>
-              <class name="function-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="left_attach">8</property>
-            <property name="top_attach">4</property>
-            <property name="width">2</property>
-          </packing>
-        </child>
-      </object>
-      <packing>
-        <property name="name">advanced</property>
-      </packing>
-    </child>
-        <style>
-          <class name="math-buttons"/>
-          <class name="buttons-programming"/>
-        </style>
-      </object>
-      <packing>
-        <property name="position">2</property>
-      </packing>
-    </child>
-  </object>
-  <object class="GtkDialog" id="character_code_dialog">
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes" comments="Title of insert character code dialog">Insert 
Character Code</property>
-    <property name="resizable">False</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="dialog-vbox3">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <child>
-          <object class="GtkBox" id="hbox21">
-            <property name="visible">True</property>
-            <property name="orientation">horizontal</property>
-            <property name="border_width">5</property>
-            <child>
-              <object class="GtkLabel" id="label39">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes" comments="Insert ASCII dialog: Label before 
character entry">Ch_aracter:</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">character_code_entry</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="character_code_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="max_length">1</property>
-                <property name="invisible_char">●</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area3">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="button8">
-                <property name="label" translatable="yes">_Cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button9">
-                <property name="label" translatable="yes" comments="Insert ASCII dialog: Button to insert 
selected character">_Insert</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-    <action-widgets>
-      <action-widget response="-6">button8</action-widget>
-      <action-widget response="-5">button9</action-widget>
-    </action-widgets>
   </object>
   <object class="GtkSizeGroup">
-    <property name="mode">both</property>
+    <property name="mode">3</property>
     <widgets>
       <widget name="basic"/>
       <widget name="advanced"/>
diff --git a/src/ui/calculator.css b/src/ui/calculator.css
index f3e396c9..347a920d 100644
--- a/src/ui/calculator.css
+++ b/src/ui/calculator.css
@@ -3,7 +3,7 @@
   padding-bottom: 8px;
   padding-left: 0px;
   font-size: 1.4em;
-
+  border-top: 1px solid @borders;
 }
 
 .info-view {
@@ -25,17 +25,17 @@ mathdisplay:last-child {
   margin-bottom: 12px;
 }
 
-clamp.small mathdisplay {
+clamp > grid.small mathdisplay {
   border-width: 1px 0;
   margin: 6px 0 0 0;
 }
 
-clamp.small mathdisplay:first-child {
+clamp > grid.small mathdisplay:first-child {
   border-top-width: 0;
   margin: 0;
 }
 
-clamp.small mathdisplay:last-child {
+clamp > grid.small mathdisplay:last-child {
   border-bottom-width: 0;
 }
 
@@ -116,16 +116,14 @@ clamp.small .bit-panel button {
   padding: 2px 4px 2px 4px;
 }
 
-  .math-buttons .number-button {
-    font-size: 1.2em;
-    font-weight: bolder;
-  }
-
-  .math-buttons .numeric-point-button {
-  }
+.math-buttons .number-button {
+  font-size: 1.2em;
+  font-weight: bolder;
+}
 
-  .math-buttons .fx-button {
-  }
+.math-buttons .operator-button, .procent-button, .numeric-point-button, .parenthesis-button, 
.function-button {
+  font-weight: normal;
+}
 
 .bit-toggle-button {
   padding: 1px;
@@ -171,6 +169,10 @@ row.popover-row {
   min-height: 35px;
 }
 
-window > deck > * {
+window > leaflet > * {
   min-width: 360px;
 }
+
+.italic {
+  font-style: italic;
+}
diff --git a/src/ui/history-entry.ui b/src/ui/history-entry.ui
index 88ee4717..e941b9e2 100644
--- a/src/ui/history-entry.ui
+++ b/src/ui/history-entry.ui
@@ -6,80 +6,68 @@
     <property name="can_focus">False</property>
     <child>
       <object class="GtkGrid" id="Grid">
-        <property name="visible">True</property>
         <property name="margin_start">12</property>
         <property name="margin_end">16</property>
-        <property name="can_focus">False</property>
         <property name="column_homogeneous">True</property>
         <child>
-          <object class="GtkEventBox" id="equation_eventbox">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <signal name="button-press-event" handler="equation_clicked_cb" swapped="no"/>
-            <style>
-              <class name="equation-label"/>
-            </style>
+          <object class="GtkLabel" id="equation_label">
+            <property name="ellipsize">end</property>
+            <property name="xalign">0.0</property>
+            <property name="yalign">0.5</property>
+            <property name="max_width_chars">1</property>
             <child>
-              <object class="GtkLabel" id="equation_label">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="ellipsize">end</property>
-                <property name="xalign">0.0</property>
-                <property name="yalign">0.5</property>
-                <property name="max_width_chars">1</property>
+              <object class="GtkGestureClick">
+                <signal name="pressed" handler="equation_clicked_cb" swapped="no"/>
               </object>
             </child>
+            <layout>
+              <property name="column">0</property>
+              <property name="row">0</property>
+              <property name="column_span">4</property>
+            </layout>
+            <style>
+              <class name="equation-label"/>
+            </style>
           </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">0</property>
-            <property name="width">4</property>
-          </packing>
         </child>
         <child>
           <object class="GtkLabel" id="equation_symbol">
             <property name="label">=</property>
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="xalign">0.5</property>
             <property name="yalign">0.5</property>
             <property name="max_width_chars">1</property>
+            <layout>
+              <property name="column">4</property>
+              <property name="row">0</property>
+            </layout>
             <style>
               <class name="equation-symbol"/>
             </style>
           </object>
-          <packing>
-            <property name="left_attach">4</property>
-            <property name="top_attach">0</property>
-          </packing>
         </child>
         <child>
-          <object class="GtkEventBox" id="answer_eventbox">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <signal name="button-press-event" handler="answer_clicked_cb" swapped="no"/>
-            <style>
-              <class name="answer-label"/>
-            </style>
+          <object class="GtkLabel" id="answer_label">
+            <property name="ellipsize">end</property>
+            <property name="xalign">1.0</property>
+            <property name="yalign">0.5</property>
+            <property name="max_width_chars">12</property>
             <child>
-              <object class="GtkLabel" id="answer_label">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="ellipsize">end</property>
-                <property name="xalign">1.0</property>
-                <property name="yalign">0.5</property>
-                <property name="max_width_chars">12</property>
-                <attributes>
-                  <attribute name="weight" value="bold"/>
-                </attributes>
+              <object class="GtkGestureClick">
+                <signal name="pressed" handler="answer_clicked_cb" swapped="no"/>
               </object>
             </child>
+            <layout>
+              <property name="column">5</property>
+              <property name="row">0</property>
+              <property name="column_span">2</property>
+            </layout>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+            <style>
+              <class name="answer-label"/>
+            </style>
           </object>
-          <packing>
-            <property name="left_attach">5</property>
-            <property name="top_attach">0</property>
-            <property name="width">2</property>
-          </packing>
         </child>
       </object>
     </child>
diff --git a/src/ui/history-view.ui b/src/ui/history-view.ui
index f850f145..d7f2d6b3 100644
--- a/src/ui/history-view.ui
+++ b/src/ui/history-view.ui
@@ -1,33 +1,30 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Generated with glade 3.19.0 -->
 <interface>
-  <requires lib="gtk+" version="3.16"/>
-  <template class="HistoryView" parent="GtkScrolledWindow">
-    <property name="height_request">118</property>
-    <property name="visible">True</property>
-    <property name="can_focus">True</property>
-    <property name="vexpand">True</property>
-    <property name="hscrollbar_policy">never</property>
-    <property name="shadow_type">etched-out</property>
+  <template class="HistoryView" parent="AdwBin">
     <signal name="row_added" handler="scroll_bottom" swapped="no"/>
-    <child>
-      <object class="GtkViewport" id="viewport">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="hexpand">True</property>
-        <child>
-          <object class="GtkListBox" id="listbox">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="vexpand">True</property>
-            <property name="valign">end</property>
-            <property name="selection_mode">none</property>
+    <property name="child">
+      <object class="GtkScrolledWindow" id="scrolled_window">
+        <property name="height_request">118</property>
+        <property name="vexpand">True</property>
+        <property name="hscrollbar_policy">never</property>
+        <property name="child">
+          <object class="GtkViewport" id="viewport">
+            <property name="hexpand">True</property>
+            <property name="scroll_to_focus">True</property>
+            <child>
+              <object class="GtkListBox" id="listbox">
+                <property name="vexpand">True</property>
+                <property name="valign">end</property>
+                <property name="selection_mode">none</property>
+              </object>
+            </child>
           </object>
-        </child>
+        </property>
+        <style>
+          <class name="history-view"/>
+        </style>
       </object>
-    </child>
-    <style>
-      <class name="history-view"/>
-    </style>
+    </property>
   </template>
 </interface>
diff --git a/src/ui/math-converter.ui b/src/ui/math-converter.ui
index 513a49b0..9daf5823 100644
--- a/src/ui/math-converter.ui
+++ b/src/ui/math-converter.ui
@@ -8,15 +8,12 @@
         <property name="visible" bind-source="MathConverter" bind-property="outer-box-visible" 
bind-flags="sync-create|bidirectional"/>
         <property name="orientation">horizontal</property>
         <property name="sensitive">True</property>
-        <property name="can_focus">False</property>
         <property name="halign">center</property>
         <property name="valign">center</property>
         <property name="hexpand">True</property>
         <property name="vexpand">False</property>
         <child>
           <object class="GtkComboBox" id="from_combo">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="hexpand">True</property>
             <signal name="changed" handler="from_combobox_changed_cb" swapped="no"/>
             <child>
@@ -31,8 +28,6 @@
         </child>
         <child>
           <object class="GtkButton" id="in_button">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="label" translatable="yes"> to </property>
             <signal name="clicked" handler="convert_button_clicked_cb" swapped="no"/>
             <style>
@@ -42,8 +37,6 @@
         </child>
         <child>
           <object class="GtkComboBox" id="to_combo">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="opacity">0.88</property>
             <property name="hexpand">True</property>
             <signal name="changed" handler="to_combobox_changed_cb" swapped="no"/>
@@ -60,22 +53,18 @@
         <child>
           <object class="GtkButton" id="swap_button">
             <property name="label">⇆</property>
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
+            <property name="has_frame">False</property>
             <property name="receives_default">False</property>
             <property name="tooltip_text" translatable="yes">Switch conversion units</property>
-            <property name="relief">none</property>
             <signal name="clicked" handler="swap_button_clicked_cb" swapped="no"/>
           </object>
         </child>
         <child>
           <object class="GtkBox" id="result_holder">
-            <property name="visible">True</property>
             <property name="orientation">horizontal</property>
             <property name="sensitive">True</property>
             <property name="spacing">6</property>
             <property name="margin-end">2</property>
-            <property name="can_focus">False</property>
             <property name="halign">end</property>
             <property name="valign">center</property>
             <property name="hexpand">True</property>
@@ -83,10 +72,8 @@
             <property name="visible" bind-source="MathConverter" bind-property="view-more-visible" 
bind-flags="sync-create|bidirectional|invert-boolean"/>
             <child>
               <object class="GtkLabel" id="from_label">
-                <property name="visible">True</property>
                 <property name="sensitive">True</property>
                 <property name="selectable">True</property>
-                <property name="can_focus">False</property>
                 <property name="halign">start</property>
                 <property name="valign">center</property>
                 <property name="hexpand">True</property>
@@ -99,9 +86,7 @@
             </child>
             <child>
               <object class="GtkLabel" id="convert_equals">
-                <property name="visible">True</property>
                 <property name="sensitive">True</property>
-                <property name="can_focus">False</property>
                 <property name="halign">center</property>
                 <property name="valign">center</property>
                 <property name="hexpand">False</property>
@@ -114,10 +99,8 @@
             </child>
             <child>
               <object class="GtkLabel" id="to_label">
-                <property name="visible">True</property>
                 <property name="sensitive">True</property>
                 <property name="selectable">True</property>
-                <property name="can_focus">False</property>
                 <property name="halign">fill</property>
                 <property name="valign">center</property>
                 <property name="hexpand">True</property>
@@ -127,9 +110,6 @@
                 <property name="xalign">0</property>
                 <property name="yalign">0</property>
               </object>
-              <packing>
-                <property name="expand">false</property>
-              </packing>
             </child>
           </object>
         </child>
@@ -138,7 +118,6 @@
             <property name="orientation">horizontal</property>
             <property name="sensitive">True</property>
             <property name="spacing">6</property>
-            <property name="can_focus">False</property>
             <property name="halign">end</property>
             <property name="valign">center</property>
             <property name="hexpand">True</property>
@@ -146,10 +125,8 @@
             <property name="visible" bind-source="result_holder" bind-property="visible" 
bind-flags="sync-create|invert-boolean"/>
             <child>
               <object class="GtkLabel">
-                <property name="visible">True</property>
                 <property name="sensitive">True</property>
                 <property name="selectable">True</property>
-                <property name="can_focus">False</property>
                 <property name="halign">start</property>
                 <property name="valign">center</property>
                 <property name="hexpand">True</property>
@@ -163,9 +140,7 @@
             </child>
             <child>
               <object class="GtkLabel">
-                <property name="visible">True</property>
                 <property name="sensitive">True</property>
-                <property name="can_focus">False</property>
                 <property name="halign">center</property>
                 <property name="valign">center</property>
                 <property name="hexpand">False</property>
@@ -178,10 +153,8 @@
             </child>
             <child>
               <object class="GtkLabel">
-                <property name="visible">True</property>
                 <property name="sensitive">True</property>
                 <property name="selectable">True</property>
-                <property name="can_focus">False</property>
                 <property name="halign">fill</property>
                 <property name="valign">center</property>
                 <property name="hexpand">True</property>
@@ -195,32 +168,22 @@
             </child>
             <child>
               <object class="GtkToggleButton" id="view_more_button">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
+                <property name="icon_name">view-more-horizontal-symbolic</property>
                 <property name="receives_default">False</property>
                 <property name="active" bind-source="MathConverter" bind-property="view-more-active" 
bind-flags="sync-create|bidirectional"/>
-                <child>
-                  <object class="GtkImage">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="icon_name">view-more-horizontal-symbolic</property>
-                    <property name="icon_size">1</property>
-                  </object>
-                </child>
                 <style>
-                  <class name="image-button"/>
                   <class name="view-more-button"/>
                 </style>
               </object>
             </child>
           </object>
         </child>
+        <layout>
+          <property name="column">0</property>
+          <property name="row">1</property>
+          <property name="column_span">4</property>
+        </layout>
       </object>
-      <packing>
-        <property name="left-attach">0</property>
-        <property name="top-attach">1</property>
-        <property name="width">4</property>
-      </packing>
     </child>
   </template>
 </interface>
diff --git a/src/ui/math-function-popover.ui b/src/ui/math-function-popover.ui
index 2e3bbf14..bd6f167e 100644
--- a/src/ui/math-function-popover.ui
+++ b/src/ui/math-function-popover.ui
@@ -2,25 +2,20 @@
 <interface>
   <requires lib="gtk+" version="3.16"/>
   <template class="MathFunctionPopover" parent="MathPopover">
-    <property name="can_focus">False</property>
     <child>
       <object class="GtkBox" id="vbox">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="border_width">6</property>
+        <property name="margin_top">6</property>
+        <property name="margin_bottom">6</property>
+        <property name="margin_start">6</property>
+        <property name="margin_end">6</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
         <child>
           <object class="GtkScrolledWindow" id="function_list_scrolled">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="height_request">200</property>
-            <property name="shadow_type">in</property>
             <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
             <child>
               <object class="GtkListBox" id="function_list">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
                 <property name="selection_mode">none</property>
                 <signal name="row_activated" handler="insert_function_cb" swapped="no"/>
               </object>
@@ -29,45 +24,29 @@
         </child>
         <child>
           <object class="GtkEntry" id="function_name_entry">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
             <property name="placeholder_text" translatable="yes">New function</property>
-            <signal name="focus" handler="function_name_focus_cb" swapped="no"/>
+            <!--<signal name="focus" handler="function_name_focus_cb" swapped="no"/>-->
             <signal name="changed" handler="function_name_entry_changed_cb" swapped="no"/>
             <signal name="activate" handler="add_function_cb" swapped="no"/>
           </object>
         </child>
         <child>
           <object class="GtkBox" id="add_function_box">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="orientation">horizontal</property>
             <property name="spacing">6</property>
             <property name="tooltip_text" translatable="yes">Select no. of arguments</property>
             <child>
               <object class="GtkSpinButton" id="add_arguments_button">
-                <property name="visible">True</property>
-                <property name="expand">True</property>
-                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
               </object>
             </child>
             <child>
               <object class="GtkButton" id="add_function_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="sensitive">False</property>
+                <property name="icon_name">list-add-symbolic</property>
                 <signal name="clicked" handler="add_function_cb" swapped="no"/>
-                <child>
-                  <object class="GtkImage" id="add_function_button_image">
-                    <property name="visible">True</property>
-                    <property name="icon_name">list-add-symbolic</property>
-                    <property name="pixel_size">16</property>
-                  </object>
-                </child>
               </object>
-              <packing>
-                <property name="pack_type">end</property>
-              </packing>
             </child>
           </object>
         </child>
diff --git a/src/ui/math-preferences.ui b/src/ui/math-preferences.ui
index 8331d839..22ff1f3d 100644
--- a/src/ui/math-preferences.ui
+++ b/src/ui/math-preferences.ui
@@ -7,25 +7,20 @@
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
-  <template class="MathPreferencesDialog" parent="HdyPreferencesWindow">
+  <template class="MathPreferencesDialog" parent="AdwPreferencesWindow">
     <property name="search_enabled">False</property>
     <property name="default_height">440</property>
     <child>
-      <object class="HdyPreferencesPage">
-        <property name="visible">True</property>
+      <object class="AdwPreferencesPage">
         <child>
-          <object class="HdyPreferencesGroup">
-            <property name="visible">True</property>
+          <object class="AdwPreferencesGroup">
             <child>
-              <object class="HdyActionRow">
-                <property name="visible">True</property>
+              <object class="AdwActionRow">
                 <property name="title" translatable="yes">Number of _decimals</property>
                 <property name="use_underline">True</property>
                 <!-- <property name="mnemonic_widget">spinbutton_decimals</property> -->
                 <child>
                   <object class="GtkSpinButton" id="spinbutton_decimals">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
                     <property name="valign">center</property>
                     <property name="adjustment">adjustment_decimals</property>
                     <property name="numeric">True</property>
@@ -35,54 +30,63 @@
               </object>
             </child>
             <child>
-              <object class="HdyActionRow">
-                <property name="visible">True</property>
+              <object class="AdwActionRow">
                 <property name="title" translatable="yes">Trailing _zeroes</property>
                 <property name="use_underline">True</property>
                 <property name="activatable_widget">switch_trailing_zeroes</property>
                 <child>
                   <object class="GtkSwitch" id="switch_trailing_zeroes">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
                     <property name="valign">center</property>
                   </object>
                 </child>
               </object>
             </child>
             <child>
-              <object class="HdyActionRow">
-                <property name="visible">True</property>
+              <object class="AdwActionRow">
                 <property name="title" translatable="yes">_Thousands separators</property>
                 <property name="use_underline">True</property>
                 <property name="activatable_widget">switch_thousands_separators</property>
                 <child>
                   <object class="GtkSwitch" id="switch_thousands_separators">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
                     <property name="valign">center</property>
                   </object>
                 </child>
               </object>
             </child>
             <child>
-              <object class="HdyComboRow" id="row_angle_units">
-                <property name="visible">True</property>
+              <object class="AdwComboRow" id="row_angle_units">
                 <property name="title" translatable="yes">_Angle units</property>
                 <property name="use_underline">True</property>
+                <property name="model">
+                  <object class="AdwEnumListModel">
+                    <property name="enum_type">AngleUnit</property>
+                  </object>
+                </property>
+                <!-- <property name="expression">
+                  <closure type="gchararray" function="angle_units_name"/>
+                </property> -->
               </object>
             </child>
             <child>
-              <object class="HdyComboRow" id="row_word_size">
-                <property name="visible">True</property>
+              <object class="AdwComboRow" id="row_word_size">
                 <property name="title" translatable="yes">Word _size</property>
                 <property name="use_underline">True</property>
+                <property name="model">
+                  <object class="AdwEnumListModel">
+                    <property name="enum_type">WordSize</property>
+                  </object>
+                </property>
               </object>
             </child>
             <child>
-              <object class="HdyComboRow" id="row_refresh_interval">
-                <property name="visible">True</property>
+              <object class="AdwComboRow" id="row_refresh_interval">
                 <property name="title" translatable="yes">E_xchange rate refresh interval</property>
                 <property name="use_underline">True</property>
+                <property name="model">
+                  <object class="AdwEnumListModel">
+                    <property name="enum_type">RefreshInterval</property>
+                  </object>
+                </property>
               </object>
             </child>
           </object>
diff --git a/src/ui/math-variable-popover.ui b/src/ui/math-variable-popover.ui
index 1d375d29..cb98fc49 100644
--- a/src/ui/math-variable-popover.ui
+++ b/src/ui/math-variable-popover.ui
@@ -2,25 +2,20 @@
 <interface>
   <requires lib="gtk+" version="3.16"/>
   <template class="MathVariablePopover" parent="MathPopover">
-    <property name="can_focus">False</property>
     <child>
       <object class="GtkBox" id="content">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="border_width">6</property>
+        <property name="margin_top">6</property>
+        <property name="margin_bottom">6</property>
+        <property name="margin_start">6</property>
+        <property name="margin_end">6</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
         <child>
           <object class="GtkScrolledWindow" id="variable_list_scrolled">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="height_request">150</property>
-            <property name="shadow_type">in</property>
             <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
             <child>
               <object class="GtkListBox" id="variable_list">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
                 <property name="selection_mode">none</property>
                 <signal name="row_activated" handler="insert_variable_cb" swapped="no"/>
               </object>
@@ -29,15 +24,11 @@
         </child>
         <child>
           <object class="GtkBox" id="add_variable_box">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="spacing">6</property>
             <property name="orientation">horizontal</property>
             <child>
               <object class="GtkEntry" id="variable_name_entry">
                 <property name="placeholder_text" translatable="yes">Variable name</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
                 <signal name="changed" handler="variable_name_changed_cb" swapped="no"/>
                 <signal name="activate" handler="store_variable_cb" swapped="no"/>
@@ -45,18 +36,10 @@
             </child>
             <child>
               <object class="GtkButton" id="store_variable_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="sensitive">False</property>
                 <property name="tooltip_text" translatable="yes">Store value into existing or new 
variable</property>
+                <property name="icon_name">document-save-symbolic</property>
                 <signal name="clicked" handler="store_variable_cb" swapped="no"/>
-                <child>
-                  <object class="GtkImage" id="store_variable_button_image">
-                    <property name="visible">True</property>
-                    <property name="icon_name">document-save-symbolic</property>
-                    <property name="pixel_size">16</property>
-                  </object>
-                </child>
               </object>
             </child>
           </object>
diff --git a/src/ui/math-window.ui b/src/ui/math-window.ui
index bdd4abdf..d1927bf9 100644
--- a/src/ui/math-window.ui
+++ b/src/ui/math-window.ui
@@ -103,139 +103,63 @@
       </item>
     </section>
   </menu>
-  <template class="MathWindow" parent="HdyApplicationWindow">
-    <property name="can_focus">False</property>
+  <template class="MathWindow" parent="AdwApplicationWindow">
     <property name="title" translatable="yes">Calculator</property>
-    <property name="role">gnome-calculator</property>
-    <property name="resizable">True</property>
-    <property name="show_menubar">False</property>
     <property name="default_width">680</property>
     <child>
       <object class="GtkBox">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <child>
-          <object class="HdyHeaderBar" id="headerbar">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="show_close_button">True</property>
+          <object class="AdwHeaderBar" id="headerbar">
             <child type="title">
               <object class="GtkMenuButton" id="menu_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="relief">none</property>
                 <property name="menu_model">window_menu</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject">
-                    <property name="accessible-name" translatable="yes">Mode selection</property>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkGrid" id="grid1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="valign">center</property>
-                    <property name="column_spacing">6</property>
-                    <child>
-                      <object class="GtkLabel" id="mode_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="ellipsize">end</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkArrow" id="arrow">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="arrow_type">down</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">0</property>
-                      </packing>
-                    </child>
-                  </object>
-                </child>
+                <property name="always_show_arrow">True</property>
+                <property name="tooltip_text" translatable="yes">Mode selection</property>
                 <style>
                   <class name="title"/>
-                  <class name="text-button"/>
                 </style>
               </object>
             </child>
             <child>
               <object class="GtkButton" id="undo_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
                 <property name="valign">center</property>
                 <property name="use_underline">True</property>
                 <property name="focus_on_click">False</property>
-                <property name="label" translatable="yes">Undo</property>
                 <property name="tooltip_text" translatable="yes">Undo [Ctrl+Z]</property>
                 <property name="action_name">win.undo</property>
-                <style>
-                  <class name="text-button"/>
-                </style>
+                <property name="child">
+                  <object class="AdwButtonContent">
+                    <property name="label" translatable="yes">Undo</property>
+                    <property name="icon_name">edit-undo-symbolic</property>
+                  </object>
+                </property>
               </object>
             </child>
-            <child>
+            <child type="end">
               <object class="GtkMenuButton" id="primary_menu_button">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
+                <property name="icon_name">open-menu-symbolic</property>
                 <property name="receives_default">False</property>
                 <property name="menu_model">primary_menu</property>
-                <accelerator key="F10" signal="clicked"/>
-                <child internal-child="accessible">
-                  <object class="AtkObject">
-                    <property name="accessible-name" translatable="yes">Primary menu</property>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkImage">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="icon_name">open-menu-symbolic</property>
-                    <property name="icon_size">1</property>
-                  </object>
-                </child>
-                <style>
-                  <class name="image-button"/>
-                </style>
+                <property name="tooltip_text" translatable="yes">Primary menu</property>
               </object>
-              <packing>
-                <property name="pack_type">end</property>
-              </packing>
             </child>
           </object>
         </child>
         <child>
-          <object class="HdyClamp">
-            <property name="visible">True</property>
+          <object class="AdwClamp">
             <!-- (5*60px button width + 4*4px spacing + 12px margin) * 2 panels + 12px panel spacing = 668 
width. -->
             <!-- Update the panel size in CSS accordingly. -->
             <property name="maximum-size">668</property>
             <property name="tightening-threshold">668</property>
             <child>
               <object class="GtkGrid" id="grid">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
                 <property name="vexpand">True</property>
-                <property name="border_width">0</property>
                 <property name="orientation">vertical</property>
                 <child>
                   <object class="MathConverter" id="converter">
                     <property name="visible">False</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
-                  </packing>
                 </child>
               </object>
             </child>


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