diff --git a/.gitignore b/.gitignore index 72fcce0..cacd197 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ tmp/ # temporary files *~ # temporary glade files -\#* \ No newline at end of file +\#* +/subprojects/blueprint-compiler diff --git a/data/resources/meson.build b/data/resources/meson.build index 1beddad..e304c99 100644 --- a/data/resources/meson.build +++ b/data/resources/meson.build @@ -1,3 +1,31 @@ +blueprints = custom_target('blueprints', + input: files( + 'ui/pages/confirm.blp', + 'ui/pages/disk.blp', + 'ui/pages/done.blp', + 'ui/pages/encrypt.blp', + 'ui/pages/install.blp', + 'ui/pages/internet.blp', + 'ui/pages/keyboard_layout.blp', + 'ui/pages/language.blp', + 'ui/pages/locale.blp', + 'ui/pages/restart.blp', + 'ui/pages/software.blp', + 'ui/pages/user.blp', + 'ui/pages/failed.blp', + 'ui/widgets/device_row.blp', + 'ui/widgets/horizontally_scrollable_list.blp', + 'ui/widgets/language_row.blp', + 'ui/widgets/progress_row.blp', + 'ui/widgets/selection_row.blp', + 'ui/widgets/software_row.blp', + 'ui/widgets/no_partitions_row.blp', + 'ui/confirm_quit_popup.blp', + 'ui/main_window.blp', + ), + output: '.', + command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'], +) pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()) gnome = import('gnome') @@ -5,6 +33,7 @@ gnome.compile_resources( meson.project_name(), meson.project_name() + '.gresource.xml', gresource_bundle: true, + dependencies: blueprints, install: true, install_dir: pkgdatadir ) diff --git a/data/resources/ui/confirm_quit_popup.blp b/data/resources/ui/confirm_quit_popup.blp new file mode 100644 index 0000000..9d56943 --- /dev/null +++ b/data/resources/ui/confirm_quit_popup.blp @@ -0,0 +1,72 @@ +using Gtk 4.0; + +template ConfirmQuitPopup : .AdwWindow { + destroy-with-parent: "True"; + content: + WindowHandle { + Box { + margin-start: 12; + margin-end: 12; + margin-top: 12; + margin-bottom: 12; + orientation: vertical; + spacing: 12; + + Image { + pixel-size: 128; + icon-name: "dialog-warning-symbolic"; + } + + Label { + halign: center; + valign: center; + + /* Translators: Shown if user wants to close window with running installation */ + + label: _("Stopping a running installation will leave the disk in an undefined state that might potentially be harmful"); + justify: center; + wrap: true; + max-width-chars: 45; + + styles [ + "title-2", + ] + } + + Box { + spacing: 6; + homogeneous: true; + + Button continue_button { + /* Translators: Underscore can not be the same as for 'Stop Installation'. */ + + label: _("_Continue Installation"); + focusable: true; + receives-default: true; + use-underline: true; + + styles [ + "suggested-action", + "pill", + ] + } + + Button stop_button { + /* Translators: Underscore can not be the same as for 'Continue Installation'. */ + + label: _("_Stop Installation"); + focusable: true; + receives-default: true; + use-underline: true; + + styles [ + "destructive-action", + "pill", + ] + } + } + } + } + + ; +} diff --git a/data/resources/ui/confirm_quit_popup.ui b/data/resources/ui/confirm_quit_popup.ui deleted file mode 100644 index 75d77fa..0000000 --- a/data/resources/ui/confirm_quit_popup.ui +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - diff --git a/data/resources/ui/main_window.blp b/data/resources/ui/main_window.blp new file mode 100644 index 0000000..1c2f4f4 --- /dev/null +++ b/data/resources/ui/main_window.blp @@ -0,0 +1,103 @@ +using Gtk 4.0; + +template OsInstallerWindow : .AdwApplicationWindow { + width-request: "360"; + height-request: "480"; + default-width: "420"; + default-height: "560"; + destroy => _on_quit(); + + Box { + orientation: vertical; + + .AdwHeaderBar { + show-start-title-buttons: "0"; + show-end-title-buttons: "0"; + + [start] + Box { + valign: start; + + WindowControls { + side: start; + } + + Revealer previous_revealer { + transition-type: crossfade; + margin-end: 6; + child: + Button { + action-name: "app.previous-page"; + focusable: true; + focus-on-click: false; + icon-name: "go-previous-symbolic"; + } + + ; + } + + Revealer next_revealer { + transition-type: crossfade; + child: + Button { + action-name: "app.next-page"; + focusable: true; + focus-on-click: false; + icon-name: "go-next-symbolic"; + } + + ; + } + } + + [title] + Stack image_stack { + margin-bottom: 12; + margin-top: 12; + transition-type: crossfade; + + StackPage { + name: "1"; + child: + Image { + pixel-size: 128; + } + + ; + } + + StackPage { + name: "2"; + child: + Image { + pixel-size: 128; + } + + ; + } + } + + [end] + WindowControls { + valign: start; + side: end; + } + + styles [ + "flat", + ] + } + + .AdwClamp { + vexpand: "1"; + margin-start: "6"; + margin-end: "6"; + maximum-size: "400"; + tightening-threshold: "320"; + + Stack main_stack { + transition-type: slide_left_right; + } + } + } +} diff --git a/data/resources/ui/main_window.ui b/data/resources/ui/main_window.ui deleted file mode 100644 index 45d9086..0000000 --- a/data/resources/ui/main_window.ui +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - diff --git a/data/resources/ui/pages/confirm.blp b/data/resources/ui/pages/confirm.blp new file mode 100644 index 0000000..f46e1c5 --- /dev/null +++ b/data/resources/ui/pages/confirm.blp @@ -0,0 +1,49 @@ +using Gtk 4.0; + +template ConfirmPage : Box { + margin-bottom: 18; + orientation: vertical; + spacing: 18; + + Box { + halign: center; + valign: end; + orientation: vertical; + spacing: 6; + + Label { + /* Translators: Followed by a disk or partition name */ + + label: _("This will delete all data on"); + wrap: true; + + styles [ + "title-2", + ] + } + + Label disk_label { + wrap: true; + wrap-mode: word_char; + + styles [ + "title-3", + ] + } + } + + Button confirm_button { + /* Translators: Button label to confirm disk deletion */ + + label: _("_Confirm"); + focusable: true; + receives-default: true; + halign: center; + use-underline: true; + + styles [ + "destructive-action", + "pill", + ] + } +} diff --git a/data/resources/ui/pages/confirm.ui b/data/resources/ui/pages/confirm.ui deleted file mode 100644 index 0c1f3e6..0000000 --- a/data/resources/ui/pages/confirm.ui +++ /dev/null @@ -1,48 +0,0 @@ - - - - - diff --git a/data/resources/ui/pages/disk.blp b/data/resources/ui/pages/disk.blp new file mode 100644 index 0000000..46966d9 --- /dev/null +++ b/data/resources/ui/pages/disk.blp @@ -0,0 +1,220 @@ +using Gtk 4.0; + +template DiskPage : Box { + orientation: vertical; + + Stack text_stack { + transition-type: slide_left_right; + + StackPage { + name: "disks"; + child: + CenterBox { + [center] + Label { + halign: center; + + /* Translators: Explanation for disk selection page. */ + + label: _("Select Drive for Installation"); + justify: center; + wrap: true; + + styles [ + "title-2", + ] + } + + [end] + Button refresh_button { + halign: end; + width-request: 32; + focusable: true; + halign: end; + valign: center; + + Image { + icon-name: "view-refresh-symbolic"; + } + + styles [ + "circular", + "flat", + ] + } + } + + ; + } + + StackPage { + name: "partitions"; + child: + Label disk_label { + justify: center; + wrap: true; + + styles [ + "title-2", + ] + } + + ; + } + } + + Box { + vexpand: true; + orientation: vertical; + + ScrolledWindow { + vexpand: true; + focusable: true; + margin-start: 6; + margin-end: 6; + hscrollbar-policy: external; + propagate-natural-width: true; + propagate-natural-height: true; + child: + Viewport { + vscroll-policy: natural; + child: + Stack list_stack { + margin-start: 18; + margin-end: 18; + margin-top: 6; + margin-bottom: 6; + vhomogeneous: false; + transition-type: slide_left_right; + + StackPage { + name: "disks"; + child: + ListBox disk_list { + receives-default: true; + valign: start; + + styles [ + "boxed-list", + ] + } + + ; + } + + StackPage { + name: "partitions"; + child: + Box { + orientation: vertical; + spacing: 12; + + ListBox whole_disk_list { + selection-mode: none; + + ListBoxRow { + name: "back_row"; + focusable: true; + selectable: false; + child: + Box { + margin-start: 12; + margin-end: 12; + margin-top: 6; + margin-bottom: 6; + spacing: 12; + + Label disk_size { + width-chars: 5; + max-width-chars: 7; + xalign: 1; + + styles [ + "dim-label", + ] + } + + Box { + hexpand: true; + orientation: vertical; + spacing: 2; + + Label { + valign: end; + + /* Translators: Label to go back to overview of all disks */ + + label: _("Use Whole Disk"); + wrap: true; + xalign: 0; + } + + Label disk_device_path { + valign: start; + width-chars: 5; + max-width-chars: 7; + xalign: 0; + + styles [ + "dim-label", + ] + } + } + + Image { + icon-name: "go-next-symbolic"; + } + } + + ; + } + + styles [ + "boxed-list", + ] + } + + ListBox partition_list { + valign: start; + + styles [ + "boxed-list", + ] + } + } + + ; + } + } + + ; + } + + ; + + styles [ + "scrollbar", + ] + } + + styles [ + "scrollable-box", + ] + } + + Button settings_button { + /* Translators: Button label to open disk management tool. Underscore can not be for same as for 'Reload' */ + + label: _("_Manage Disks"); + focusable: true; + halign: center; + valign: end; + margin-top: 12; + margin-bottom: 18; + use-underline: true; + + styles [ + "pill", + ] + } +} diff --git a/data/resources/ui/pages/disk.ui b/data/resources/ui/pages/disk.ui deleted file mode 100644 index ce1bb75..0000000 --- a/data/resources/ui/pages/disk.ui +++ /dev/null @@ -1,214 +0,0 @@ - - - - - diff --git a/data/resources/ui/pages/done.blp b/data/resources/ui/pages/done.blp new file mode 100644 index 0000000..28e69fb --- /dev/null +++ b/data/resources/ui/pages/done.blp @@ -0,0 +1,50 @@ +using Gtk 4.0; + +template DonePage : Box { + orientation: vertical; + + Box { + halign: center; + margin-bottom: 18; + orientation: vertical; + spacing: 12; + + Label { + /* Translators: Informative label after successful installation */ + + label: _("Installation complete"); + + styles [ + "title-2", + ] + } + + Button restart_button { + /* Translators: Button label to restart system directly after successful installation. Underscore can not be for same letter as 'Restart Later'. */ + + label: _("_Restart System"); + focusable: true; + receives-default: true; + use-underline: true; + + styles [ + "suggested-action", + "pill", + ] + } + + Button { + /* Translators: Button label to delay restart after successful installation. Underscore can not be for same letter as 'Restart System'. */ + + label: _("Restart _Later"); + focusable: true; + receives-default: true; + action-name: "app.quit"; + use-underline: true; + + styles [ + "pill", + ] + } + } +} diff --git a/data/resources/ui/pages/done.ui b/data/resources/ui/pages/done.ui deleted file mode 100644 index 33bbe07..0000000 --- a/data/resources/ui/pages/done.ui +++ /dev/null @@ -1,47 +0,0 @@ - - - - - diff --git a/data/resources/ui/pages/encrypt.blp b/data/resources/ui/pages/encrypt.blp new file mode 100644 index 0000000..be0d9de --- /dev/null +++ b/data/resources/ui/pages/encrypt.blp @@ -0,0 +1,142 @@ +using Gtk 4.0; + +template EncryptPage : Box { + margin-bottom: 18; + orientation: vertical; + spacing: 12; + + Box { + orientation: vertical; + + ListBox default_list { + selection-mode: none; + + ListBoxRow { + name: "encryption"; + focusable: true; + selectable: false; + child: + Box { + margin-start: 12; + margin-end: 12; + margin-top: 6; + margin-bottom: 6; + spacing: 12; + + Label { + /* Translators: Used with option to enable disk encryption */ + + label: _("Encrypt Installation"); + wrap: true; + } + + Switch switch { + focusable: true; + receives-default: true; + valign: center; + } + } + + ; + } + + styles [ + "boxed-list", + ] + } + + Revealer revealer { + vexpand: true; + valign: start; + transition-duration: 200; + child: + ListBox { + margin-top: 12; + selection-mode: none; + + ListBoxRow { + focusable: true; + activatable: false; + selectable: false; + child: + Box { + margin-start: 12; + margin-end: 12; + margin-top: 6; + margin-bottom: 6; + orientation: vertical; + spacing: 12; + + Box { + spacing: 12; + + Label { + hexpand: true; + + /* Translators: Description of entry field for pin/password used for disk encryption */ + + label: _("Encryption PIN"); + wrap: true; + xalign: 0; + } + + Entry pin_field { + hexpand: true; + activates-default: true; + width-chars: 10; + max-width-chars: 16; + truncate-multiline: true; + + /* Translators: Placeholder for disk encryption pin/password field */ + + placeholder-text: _("PIN"); + input-purpose: pin; + } + } + + Box { + spacing: 12; + + Image { + icon-name: "dialog-warning-symbolic"; + } + + Label { + hexpand: true; + + /* Translators: Warning label for disk encryption */ + + label: _("Memorize this PIN well. Without it you will not be able to access your files."); + wrap: true; + } + } + } + + ; + } + + styles [ + "boxed-list", + ] + } + + ; + } + } + + Button continue_button { + /* Translators: On button. */ + + label: _("_Continue"); + focusable: true; + receives-default: true; + halign: center; + valign: center; + use-underline: true; + + styles [ + "suggested-action", + "pill", + ] + } +} diff --git a/data/resources/ui/pages/encrypt.ui b/data/resources/ui/pages/encrypt.ui deleted file mode 100644 index 1cf1d9e..0000000 --- a/data/resources/ui/pages/encrypt.ui +++ /dev/null @@ -1,139 +0,0 @@ - - - - - diff --git a/data/resources/ui/pages/failed.blp b/data/resources/ui/pages/failed.blp new file mode 100644 index 0000000..cf798c6 --- /dev/null +++ b/data/resources/ui/pages/failed.blp @@ -0,0 +1,49 @@ +using Gtk 4.0; + +template FailedPage : Box { + margin-bottom: 18; + orientation: vertical; + spacing: 12; + + Label { + halign: center; + valign: center; + + /* Translators: Shown as simple informative text */ + + label: _("The installation failed"); + justify: center; + wrap: true; + max-width-chars: 50; + + styles [ + "title-2", + ] + } + + Box terminal_box { + orientation: vertical; + + styles [ + "terminal-box", + ] + } + + Button search_button { + focusable: true; + receives-default: true; + halign: center; + + Label { + /* Translators: Shown if installation fails. */ + + label: _("Search for Help on the Internet"); + use-markup: true; + wrap: true; + } + + styles [ + "pill", + ] + } +} diff --git a/data/resources/ui/pages/failed.ui b/data/resources/ui/pages/failed.ui deleted file mode 100644 index d30f3ef..0000000 --- a/data/resources/ui/pages/failed.ui +++ /dev/null @@ -1,50 +0,0 @@ - - - - - diff --git a/data/resources/ui/pages/install.blp b/data/resources/ui/pages/install.blp new file mode 100644 index 0000000..f36891d --- /dev/null +++ b/data/resources/ui/pages/install.blp @@ -0,0 +1,71 @@ +using Gtk 4.0; + +template InstallPage : Box { + margin-bottom: 18; + orientation: vertical; + spacing: 12; + + Box { + vexpand: true; + orientation: vertical; + spacing: 12; + + Label { + /* Translators: Simple label used during Installation */ + + label: _("Installing"); + + styles [ + "title-2", + ] + } + + Stack stack { + vexpand: true; + transition-type: crossfade; + + StackPage { + name: "spinner"; + child: + Spinner spinner { + halign: center; + height-request: 64; + width-request: 64; + } + + ; + } + + StackPage { + name: "terminal"; + child: + Box terminal_box { + orientation: vertical; + + styles [ + "terminal-box", + ] + } + + ; + } + } + } + + ToggleButton terminal_button { + focusable: true; + + /* Translators: Hover information on toggle button that shows terminal output during installation. */ + + tooltip-text: _("Show Terminal Output"); + halign: center; + + Image { + icon-name: "utilities-terminal-symbolic"; + } + + styles [ + "pill", + ] + } +} diff --git a/data/resources/ui/pages/install.ui b/data/resources/ui/pages/install.ui deleted file mode 100644 index 8fe739c..0000000 --- a/data/resources/ui/pages/install.ui +++ /dev/null @@ -1,73 +0,0 @@ - - - - - diff --git a/data/resources/ui/pages/internet.blp b/data/resources/ui/pages/internet.blp new file mode 100644 index 0000000..32d2737 --- /dev/null +++ b/data/resources/ui/pages/internet.blp @@ -0,0 +1,29 @@ +using Gtk 4.0; + +template InternetPage : Box { + margin-bottom: 18; + orientation: vertical; + spacing: 18; + + Button settings_button { + focusable: true; + receives-default: true; + halign: center; + valign: center; + use-underline: true; + + Label { + /* Translators: On button for opening wifi settings. */ + + label: _("_Setup Internet Connection"); + use-underline: true; + justify: center; + wrap: true; + } + + styles [ + "suggested-action", + "pill", + ] + } +} diff --git a/data/resources/ui/pages/internet.ui b/data/resources/ui/pages/internet.ui deleted file mode 100644 index 1b5534e..0000000 --- a/data/resources/ui/pages/internet.ui +++ /dev/null @@ -1,30 +0,0 @@ - - - - - diff --git a/data/resources/ui/pages/keyboard_layout.blp b/data/resources/ui/pages/keyboard_layout.blp new file mode 100644 index 0000000..e863044 --- /dev/null +++ b/data/resources/ui/pages/keyboard_layout.blp @@ -0,0 +1,157 @@ +using Gtk 4.0; + +template KeyboardLayoutPage : Box { + orientation: vertical; + spacing: 12; + + Label { + /* Translators: Explanation for keyboard layout selection page. */ + + label: _("Select Keyboard Layout"); + justify: center; + wrap: true; + + styles [ + "title-2", + ] + } + + Entry { + focusable: true; + valign: start; + activates-default: true; + truncate-multiline: true; + primary-icon-activatable: false; + primary-icon-sensitive: false; + + /* Translators: Used as placeholder in a entry field to try out a keyboard layout */ + + placeholder-text: _("Test the Keyboard Layout Here"); + } + + Box { + hexpand: true; + orientation: vertical; + + ScrolledWindow { + focusable: true; + hexpand: true; + vexpand: true; + margin-start: 0; + margin-end: 0; + hscrollbar-policy: external; + propagate-natural-width: true; + propagate-natural-height: true; + child: + Stack stack { + margin-start: 24; + margin-end: 24; + margin-top: 12; + margin-bottom: 12; + vhomogeneous: false; + transition-type: crossfade; + + StackPage { + name: "layouts"; + child: + Box { + valign: start; + orientation: vertical; + spacing: 12; + + ListBox change_language_list { + valign: start; + hexpand: true; + selection-mode: none; + + ListBoxRow { + focusable: true; + child: + Box { + margin-start: 12; + margin-end: 12; + margin-top: 6; + margin-bottom: 6; + spacing: 12; + + Label { + /* Translators: Followed by a language name. */ + + label: _("Keyboard Language"); + wrap: true; + } + + Label language_label { + hexpand: true; + wrap: true; + xalign: 1; + } + + Image { + icon-name: "emblem-system-symbolic"; + } + } + + ; + } + + styles [ + "boxed-list", + ] + } + + ListBox layout_list { + styles [ + "boxed-list", + ] + } + } + + ; + } + + StackPage { + name: "languages"; + child: + ListBox language_list { + valign: start; + + styles [ + "boxed-list", + ] + } + + ; + } + } + + ; + + styles [ + "scrollbar", + ] + } + + styles [ + "scrollable-box", + ] + } + + Button continue_button { + /* Translators: On button. */ + + label: _("_Continue"); + sensitive: false; + focusable: true; + receives-default: true; + halign: center; + valign: end; + margin-bottom: 18; + use-underline: true; + + styles [ + "suggested-action", + "pill", + ] + } +} diff --git a/data/resources/ui/pages/keyboard_layout.ui b/data/resources/ui/pages/keyboard_layout.ui deleted file mode 100644 index 4f3bcfb..0000000 --- a/data/resources/ui/pages/keyboard_layout.ui +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - diff --git a/data/resources/ui/pages/language.blp b/data/resources/ui/pages/language.blp new file mode 100644 index 0000000..e4a61ff --- /dev/null +++ b/data/resources/ui/pages/language.blp @@ -0,0 +1,85 @@ +using Gtk 4.0; + +template LanguagePage : Overlay { + child: Box { + orientation: vertical; + + ScrolledWindow { + focusable: true; + hscrollbar-policy: external; + vscrollbar-policy: external; + propagate-natural-width: true; + propagate-natural-height: true; + child: + Viewport { + vscroll-policy: natural; + child: + Box { + margin-top: 12; + margin-bottom: 70; + orientation: vertical; + spacing: 12; + + ListBox language_list { + styles [ + "boxed-list", + ] + } + + Revealer show_all_revealer { + transition-type: slide_up; + child: + Button show_all_button { + width-request: 32; + focusable: true; + receives-default: true; + halign: center; + valign: center; + margin-bottom: 18; + + Image { + icon-name: "view-more-symbolic"; + } + + styles [ + "pill", + ] + } + + ; + } + } + + ; + } + + ; + } + } + + ; + + [overlay] + Box { + can-target: false; + height-request: 64; + valign: end; + orientation: vertical; + + styles [ + "bottom-gradient", + ] + } + + [overlay] + Box { + can-target: false; + height-request: 16; + valign: start; + orientation: vertical; + + styles [ + "top-gradient", + ] + } +} diff --git a/data/resources/ui/pages/language.ui b/data/resources/ui/pages/language.ui deleted file mode 100644 index d7e29c9..0000000 --- a/data/resources/ui/pages/language.ui +++ /dev/null @@ -1,88 +0,0 @@ - - - - - diff --git a/data/resources/ui/pages/locale.blp b/data/resources/ui/pages/locale.blp new file mode 100644 index 0000000..154c402 --- /dev/null +++ b/data/resources/ui/pages/locale.blp @@ -0,0 +1,289 @@ +using Gtk 4.0; + +template LocalePage : Box { + orientation: vertical; + + Stack overview_stack { + vhomogeneous: false; + + StackPage { + name: "overview"; + child: + Box { + margin-bottom: 18; + orientation: vertical; + spacing: 12; + + Label { + valign: start; + + /* Translators: Above list of continents and countries */ + + label: _("Adapt to Location"); + justify: center; + wrap: true; + + styles [ + "title-2", + ] + } + + ListBox overview_list { + selection-mode: none; + + ListBoxRow { + name: "timezone"; + focusable: true; + selectable: false; + child: + Box { + margin-start: 12; + margin-end: 12; + margin-top: 12; + margin-bottom: 12; + spacing: 12; + + Label { + /* Translators: Presented next to the current Timezone. */ + + label: _("Timezone"); + wrap: true; + } + + Label timezone_label { + ellipsize: end; + hexpand: true; + wrap: true; + xalign: 1; + } + + Image { + icon-name: "emblem-system-symbolic"; + } + } + + ; + } + + ListBoxRow { + name: "formats"; + focusable: true; + selectable: false; + child: + Box { + margin-start: 12; + margin-end: 12; + margin-top: 12; + margin-bottom: 12; + orientation: vertical; + spacing: 6; + + Box { + spacing: 12; + + Label { + /* Translators: Presented next to the current Formats. */ + + label: _("Formats"); + wrap: true; + } + + Label formats_label { + ellipsize: end; + hexpand: true; + wrap: true; + xalign: 1; + } + + Image { + icon-name: "emblem-system-symbolic"; + } + } + + Label { + /* Translators: Description of what is covered by formats. */ + + label: _("Defines the default format used for dates, times, numbers, etc."); + wrap: true; + max-width-chars: 60; + xalign: 0; + + styles [ + "dim-label", + ] + } + } + + ; + } + + styles [ + "boxed-list", + ] + } + + Button confirm_button { + /* Translators: On button. */ + + label: _("_Confirm"); + focusable: true; + receives-default: true; + halign: center; + valign: center; + use-underline: true; + + styles [ + "suggested-action", + "pill", + ] + } + } + + ; + } + + StackPage { + name: "list"; + child: + Box { + margin-bottom: 18; + orientation: vertical; + spacing: 12; + + Stack text_stack { + valign: start; + + StackPage { + name: "timezone"; + child: + Label { + valign: start; + + /* Translators: Above list of continents and countries */ + + label: _("Select Location"); + justify: center; + wrap: true; + + styles [ + "title-2", + ] + } + + ; + } + + StackPage { + name: "formats"; + child: + Label { + valign: start; + + /* Translators: Above list of format locales */ + + label: _("Select Region"); + justify: center; + wrap: true; + + styles [ + "title-2", + ] + } + + ; + } + } + + Box { + orientation: vertical; + + ScrolledWindow { + vexpand: true; + margin-start: 6; + margin-end: 6; + hscrollbar-policy: external; + propagate-natural-width: true; + propagate-natural-height: true; + child: + Stack list_stack { + margin-start: 18; + margin-end: 18; + margin-top: 6; + margin-bottom: 6; + vhomogeneous: false; + transition-type: crossfade; + + StackPage { + name: "timezone_continents"; + child: + ListBox continents_list { + valign: start; + + styles [ + "boxed-list", + ] + } + + ; + } + + StackPage { + name: "timezone_countries"; + child: + ListBox countries_list { + valign: start; + + styles [ + "boxed-list", + ] + } + + ; + } + + StackPage { + name: "timezone_subzones"; + child: + ListBox subzones_list { + valign: start; + + styles [ + "boxed-list", + ] + } + + ; + } + + StackPage { + name: "formats"; + child: + ListBox formats_list { + valign: start; + + styles [ + "boxed-list", + ] + } + + ; + } + } + + ; + + styles [ + "scrollbar", + ] + } + + styles [ + "scrollable-box", + ] + } + } + + ; + } + } +} diff --git a/data/resources/ui/pages/locale.ui b/data/resources/ui/pages/locale.ui deleted file mode 100644 index 14489fd..0000000 --- a/data/resources/ui/pages/locale.ui +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/data/resources/ui/pages/restart.blp b/data/resources/ui/pages/restart.blp new file mode 100644 index 0000000..65fdb55 --- /dev/null +++ b/data/resources/ui/pages/restart.blp @@ -0,0 +1,34 @@ +using Gtk 4.0; + +template RestartPage : Box { + margin-bottom: 18; + orientation: vertical; + spacing: 18; + + Box { + vexpand: true; + halign: center; + valign: start; + orientation: vertical; + + Label { + vexpand: true; + + /* Translators: Shown when restarting system after installation. */ + + label: _("Restarting"); + + styles [ + "title-2", + ] + } + + Spinner spinner { + vexpand: true; + margin-top: 18; + width-request: 64; + height-request: 64; + spinning: false; + } + } +} diff --git a/data/resources/ui/pages/restart.ui b/data/resources/ui/pages/restart.ui deleted file mode 100644 index 55ad8ef..0000000 --- a/data/resources/ui/pages/restart.ui +++ /dev/null @@ -1,35 +0,0 @@ - - - - - diff --git a/data/resources/ui/pages/software.blp b/data/resources/ui/pages/software.blp new file mode 100644 index 0000000..fba254e --- /dev/null +++ b/data/resources/ui/pages/software.blp @@ -0,0 +1,80 @@ +using Gtk 4.0; + +template SoftwarePage : Box { + orientation: vertical; + spacing: 12; + + Label { + valign: start; + + /* Translators: Informative label above a list of software that can be selected for installation */ + + label: _("Select Additional Software to Install"); + justify: center; + wrap: true; + + styles [ + "title-2", + ] + } + + Button continue_button { + /* Translators: On button. */ + + label: _("_Continue"); + focusable: true; + receives-default: true; + halign: center; + valign: end; + margin-bottom: 18; + use-underline: true; + + styles [ + "suggested-action", + "pill", + ] + } + + Box { + vexpand: true; + orientation: vertical; + + ScrolledWindow { + vexpand: true; + focusable: true; + margin-start: 6; + margin-end: 6; + hscrollbar-policy: external; + propagate-natural-width: true; + propagate-natural-height: true; + child: + Viewport { + vscroll-policy: natural; + child: + ListBox software_list { + margin-start: 18; + margin-end: 18; + margin-top: 6; + margin-bottom: 6; + selection-mode: none; + + styles [ + "boxed-list", + ] + } + + ; + } + + ; + + styles [ + "scrollbar", + ] + } + + styles [ + "scrollable-box", + ] + } +} diff --git a/data/resources/ui/pages/software.ui b/data/resources/ui/pages/software.ui deleted file mode 100644 index a3282e9..0000000 --- a/data/resources/ui/pages/software.ui +++ /dev/null @@ -1,74 +0,0 @@ - - - - - diff --git a/data/resources/ui/pages/user.blp b/data/resources/ui/pages/user.blp new file mode 100644 index 0000000..6cabcdb --- /dev/null +++ b/data/resources/ui/pages/user.blp @@ -0,0 +1,144 @@ +using Gtk 4.0; + +template UserPage : Box { + margin-bottom: 18; + orientation: vertical; + spacing: 12; + + Label { + /* Translators: Explanation for disk selection page. */ + + label: _("Enter Account Information"); + justify: center; + wrap: true; + + styles [ + "title-2", + ] + } + + ListBox default_list { + selection-mode: none; + + ListBoxRow { + activatable: false; + selectable: false; + child: + Box { + margin-start: 12; + margin-end: 12; + margin-top: 6; + margin-bottom: 6; + spacing: 12; + + Label { + hexpand: true; + + /* Translators: Used with entry field for User's name */ + + label: _("Name"); + wrap: true; + xalign: 0; + } + + Entry user_name_field { + focusable: true; + width-chars: 10; + max-width-chars: 24; + + /* Translators: Placeholder in user name entry field */ + + placeholder-text: _("Enter a Name"); + } + } + + ; + } + + ListBoxRow { + name: "automatic_login"; + selectable: false; + child: + Box { + margin-start: 12; + margin-end: 12; + margin-top: 6; + margin-bottom: 6; + spacing: 12; + + Label { + /* Translators: Used with option to enable automatic login of user upon booting */ + + label: _("Automatic Login"); + wrap: true; + xalign: 0; + } + + Switch autologin_switch { + focusable: true; + valign: center; + active: true; + } + } + + ; + } + + ListBoxRow { + activatable: false; + selectable: false; + child: + Box { + margin-start: 12; + margin-end: 12; + margin-top: 6; + margin-bottom: 6; + spacing: 12; + + Label { + hexpand: true; + + /* Translators: Used with entry field for setting a password for new user */ + + label: _("Password"); + wrap: true; + xalign: 0; + } + + Entry password_field { + focusable: true; + visibility: false; + width-chars: 10; + max-width-chars: 24; + + /* Translators: Placeholder in password entry field */ + + placeholder-text: _("Enter a Password"); + input-purpose: password; + } + } + + ; + } + + styles [ + "boxed-list", + ] + } + + Button continue_button { + /* Translators: On button. */ + + label: _("_Continue"); + sensitive: false; + focusable: true; + receives-default: true; + halign: center; + use-underline: true; + + styles [ + "suggested-action", + "pill", + ] + } +} diff --git a/data/resources/ui/pages/user.ui b/data/resources/ui/pages/user.ui deleted file mode 100644 index 78d01fe..0000000 --- a/data/resources/ui/pages/user.ui +++ /dev/null @@ -1,135 +0,0 @@ - - - - - diff --git a/data/resources/ui/widgets/device_row.blp b/data/resources/ui/widgets/device_row.blp new file mode 100644 index 0000000..22d2a05 --- /dev/null +++ b/data/resources/ui/widgets/device_row.blp @@ -0,0 +1,143 @@ +using Gtk 4.0; + +template DeviceRow : ListBoxRow { + focusable: true; + selectable: false; + child: + Grid { + margin-start: 12; + margin-end: 12; + margin-top: 6; + margin-bottom: 6; + row-spacing: 2; + column-spacing: 12; + + Stack arrow_stack { + halign: end; + hhomogeneous: false; + vhomogeneous: false; + + Image { + halign: end; + icon-name: "go-next-symbolic"; + } + + StackPage { + name: "too_small"; + child: + Label too_small_label { + visible: false; + halign: start; + + /* Translators: Shown for partitions that are not big enough to be installed on */ + + label: _("Not enough space for installation"); + wrap: true; + xalign: 1; + + styles [ + "dim-label", + ] + } + + ; + } + + layout { + column: "2"; + row: "0"; + row-span: "2"; + } + } + + Stack name_stack { + hexpand: true; + hhomogeneous: false; + + StackPage { + name: "disk"; + child: + Label disk_name { + /* Translators: Shown if no name can be determined for a disk. */ + + label: _("Unknow Disk"); + use-markup: true; + wrap: true; + ellipsize: end; + xalign: 0; + } + + ; + } + + StackPage { + name: "partition"; + child: + Box { + valign: end; + spacing: 4; + + Label static_label { + /* Translators: Followed by 'Partition' and a partiton name or number. */ + + label: _("Use"); + use-markup: true; + xalign: 0; + } + + Label partition_name { + hexpand: true; + + /* Translators: Label to pick one out of a list of partitions. Followed by a partition name or a number if the partition has no name. */ + + label: _("Partition"); + use-markup: true; + ellipsize: end; + width-chars: 8; + xalign: 0; + } + } + + ; + } + + layout { + column: "1"; + row: "0"; + } + } + + Label device_path { + valign: start; + ellipsize: start; + xalign: 0; + + styles [ + "dim-label", + ] + + layout { + column: "1"; + row: "1"; + } + } + + Label size { + width-chars: 5; + max-width-chars: 7; + xalign: 1; + + styles [ + "dim-label", + ] + + layout { + column: "0"; + row: "0"; + row-span: "2"; + } + } + } + + ; +} diff --git a/data/resources/ui/widgets/device_row.ui b/data/resources/ui/widgets/device_row.ui deleted file mode 100644 index 640a3ad..0000000 --- a/data/resources/ui/widgets/device_row.ui +++ /dev/null @@ -1,134 +0,0 @@ - - - - - diff --git a/data/resources/ui/widgets/horizontally_scrollable_list.blp b/data/resources/ui/widgets/horizontally_scrollable_list.blp new file mode 100644 index 0000000..6f55d46 --- /dev/null +++ b/data/resources/ui/widgets/horizontally_scrollable_list.blp @@ -0,0 +1,68 @@ +using Gtk 4.0; + +template ScrollableListBox : Box { + orientation: vertical; + + ScrolledWindow { + hscrollbar-policy: external; + vscrollbar-policy: external; + propagate-natural-width: true; + propagate-natural-height: true; + } + + Box { + orientation: vertical; + + ScrolledWindow { + focusable: true; + hscrollbar-policy: external; + vscrollbar-policy: external; + propagate-natural-width: true; + propagate-natural-height: true; + child: + Viewport { + vscroll-policy: natural; + child: + Box { + margin-top: 12; + margin-bottom: 70; + orientation: vertical; + spacing: 12; + + ListBox language_list { + styles [ + "boxed-list", + ] + } + + Revealer show_all_revealer { + transition-type: slide_up; + child: + Button show_all_button { + width-request: 32; + focusable: true; + receives-default: true; + halign: center; + valign: center; + margin-bottom: 18; + + Image { + icon-name: "view-more-symbolic"; + } + + styles [ + "circular", + ] + } + + ; + } + } + + ; + } + + ; + } + } +} diff --git a/data/resources/ui/widgets/horizontally_scrollable_list.ui b/data/resources/ui/widgets/horizontally_scrollable_list.ui deleted file mode 100644 index e01e08b..0000000 --- a/data/resources/ui/widgets/horizontally_scrollable_list.ui +++ /dev/null @@ -1,72 +0,0 @@ - - - - - diff --git a/data/resources/ui/widgets/language_row.blp b/data/resources/ui/widgets/language_row.blp new file mode 100644 index 0000000..fa2532d --- /dev/null +++ b/data/resources/ui/widgets/language_row.blp @@ -0,0 +1,28 @@ +using Gtk 4.0; + +template LanguageRow : ListBoxRow { + focusable: true; + selectable: false; + child: + Box { + margin-start: 12; + margin-end: 12; + margin-top: 6; + margin-bottom: 6; + spacing: 18; + + [center] + Label label { + hexpand: true; + wrap: true; + ellipsize: end; + lines: 2; + } + + Image { + icon-name: "go-next-symbolic"; + } + } + + ; +} diff --git a/data/resources/ui/widgets/language_row.ui b/data/resources/ui/widgets/language_row.ui deleted file mode 100644 index 44a1781..0000000 --- a/data/resources/ui/widgets/language_row.ui +++ /dev/null @@ -1,30 +0,0 @@ - - - - - diff --git a/data/resources/ui/widgets/no_partitions_row.blp b/data/resources/ui/widgets/no_partitions_row.blp new file mode 100644 index 0000000..8131dab --- /dev/null +++ b/data/resources/ui/widgets/no_partitions_row.blp @@ -0,0 +1,75 @@ +using Gtk 4.0; + +template NoPartitionsRow : ListBoxRow { + activatable: false; + focusable: true; + selectable: false; + child: + Box { + margin-start: 12; + margin-end: 12; + margin-top: 6; + margin-bottom: 6; + spacing: 12; + + Image { + icon-name: "dialog-information-symbolic"; + } + + Box { + hexpand: true; + orientation: vertical; + + Label { + /* Translators: Shown if a disk is currently not compatible with the way a system was booted. */ + + label: _("Selecting a partition is not possible."); + wrap: true; + xalign: 0; + } + + Label { + /* Translators: Followed by a list of requirements */ + + label: _("The disk requires:"); + wrap: true; + xalign: 0; + } + + Stack { + hhomogeneous: false; + vhomogeneous: false; + + StackPage { + name: "efi"; + child: + Label { + /* Translators: Technical terms, the abbreviations should not be translated. */ + + label: _(" • GPT partitioning\n • EFI partition"); + wrap: true; + xalign: 0; + } + + ; + } + + StackPage { + name: "bios"; + child: + Label { + /* Translators: Technical terms, the abbreviations should not be translated */ + + label: _(" • BIOS boot partition"); + wrap: true; + xalign: 0; + } + + ; + } + } + } + } + + ; +} diff --git a/data/resources/ui/widgets/no_partitions_row.ui b/data/resources/ui/widgets/no_partitions_row.ui deleted file mode 100644 index 57db6e0..0000000 --- a/data/resources/ui/widgets/no_partitions_row.ui +++ /dev/null @@ -1,74 +0,0 @@ - - - - - diff --git a/data/resources/ui/widgets/progress_row.blp b/data/resources/ui/widgets/progress_row.blp new file mode 100644 index 0000000..ebecd3d --- /dev/null +++ b/data/resources/ui/widgets/progress_row.blp @@ -0,0 +1,25 @@ +using Gtk 4.0; + +template ProgressRow : ListBoxRow { + focusable: true; + child: + Box { + margin-start: 12; + margin-end: 12; + margin-top: 6; + margin-bottom: 6; + spacing: 6; + + Label label { + ellipsize: end; + hexpand: true; + xalign: 0; + } + + Image { + icon-name: "go-next-symbolic"; + } + } + + ; +} diff --git a/data/resources/ui/widgets/progress_row.ui b/data/resources/ui/widgets/progress_row.ui deleted file mode 100644 index d626354..0000000 --- a/data/resources/ui/widgets/progress_row.ui +++ /dev/null @@ -1,28 +0,0 @@ - - - - - diff --git a/data/resources/ui/widgets/selection_row.blp b/data/resources/ui/widgets/selection_row.blp new file mode 100644 index 0000000..e6ed537 --- /dev/null +++ b/data/resources/ui/widgets/selection_row.blp @@ -0,0 +1,32 @@ +using Gtk 4.0; + +template SelectionRow : ListBoxRow { + focusable: true; + child: + Box { + margin-start: 12; + margin-end: 12; + margin-top: 6; + margin-bottom: 6; + spacing: 6; + + Label label { + wrap: true; + ellipsize: end; + lines: 2; + xalign: 0; + } + + Revealer check_mark_revealer { + transition-type: crossfade; + child: + Image { + icon-name: "object-select-symbolic"; + } + + ; + } + } + + ; +} diff --git a/data/resources/ui/widgets/selection_row.ui b/data/resources/ui/widgets/selection_row.ui deleted file mode 100644 index de1cf57..0000000 --- a/data/resources/ui/widgets/selection_row.ui +++ /dev/null @@ -1,34 +0,0 @@ - - - - - diff --git a/data/resources/ui/widgets/software_row.blp b/data/resources/ui/widgets/software_row.blp new file mode 100644 index 0000000..f04157f --- /dev/null +++ b/data/resources/ui/widgets/software_row.blp @@ -0,0 +1,49 @@ +using Gtk 4.0; + +template SoftwareRow : ListBoxRow { + focusable: true; + child: + Box { + margin-start: 6; + margin-end: 6; + margin-top: 6; + margin-bottom: 6; + spacing: 6; + + Image icon { + width-request: 32; + height-request: 32; + valign: center; + } + + Box { + halign: center; + valign: center; + orientation: vertical; + spacing: 6; + + Label name_label { + valign: end; + ellipsize: end; + xalign: 0; + + styles [ + "title-2", + ] + } + + Label description_label { + valign: center; + wrap: true; + xalign: 0; + } + } + + Switch switch { + focusable: true; + valign: center; + } + } + + ; +} diff --git a/data/resources/ui/widgets/software_row.ui b/data/resources/ui/widgets/software_row.ui deleted file mode 100644 index ea2aae9..0000000 --- a/data/resources/ui/widgets/software_row.ui +++ /dev/null @@ -1,55 +0,0 @@ - - - - - diff --git a/subprojects/blueprint-compiler.wrap b/subprojects/blueprint-compiler.wrap new file mode 100644 index 0000000..6e6ee32 --- /dev/null +++ b/subprojects/blueprint-compiler.wrap @@ -0,0 +1,8 @@ +[wrap-git] +directory = blueprint-compiler +url = https://gitlab.gnome.org/jwestman/blueprint-compiler.git +revision = main +depth = 1 + +[provide] +program_names = blueprint-compiler \ No newline at end of file