diff --git a/.gitignore b/.gitignore index eaa39025..3de77166 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ /debian/vanilla-installer.substvars /debian/vanilla-installer.debhelper.log install/ -.buildconfig \ No newline at end of file +.buildconfig +/subprojects/blueprint-compiler diff --git a/subprojects/blueprint-compiler.wrap b/subprojects/blueprint-compiler.wrap new file mode 100644 index 00000000..f2b09ab2 --- /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 = v0.10.1 +depth = 1 + +[provide] +program_names = blueprint-compiler \ No newline at end of file diff --git a/vanilla_installer/gtk/confirm.blp b/vanilla_installer/gtk/confirm.blp new file mode 100644 index 00000000..f217328c --- /dev/null +++ b/vanilla_installer/gtk/confirm.blp @@ -0,0 +1,40 @@ +using Gtk 4.0; + +template $VanillaConfirm : $AdwBin { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + $AdwStatusPage status_page { + title: _("Confirm Installation"); + description: _("The following changes will be made to your system:"); + + $AdwClamp { + maximum-size: "570"; + + Box { + orientation: vertical; + + $AdwPreferencesPage { + hexpand: "true"; + + $AdwPreferencesGroup group_changes { + } + + $AdwPreferencesGroup { + Button btn_confirm { + label: _("Install Vanilla OS"); + valign: center; + halign: center; + + styles [ + "destructive-action", + "pill", + ] + } + } + } + } + } + } +} diff --git a/vanilla_installer/gtk/confirm.ui b/vanilla_installer/gtk/confirm.ui deleted file mode 100644 index d5197595..00000000 --- a/vanilla_installer/gtk/confirm.ui +++ /dev/null @@ -1,48 +0,0 @@ - - - - - \ No newline at end of file diff --git a/vanilla_installer/gtk/default-disk.blp b/vanilla_installer/gtk/default-disk.blp new file mode 100644 index 00000000..23130711 --- /dev/null +++ b/vanilla_installer/gtk/default-disk.blp @@ -0,0 +1,88 @@ +using Gtk 4.0; + +template $VanillaDefaultDisk : $AdwBin { + halign: "0"; + valign: "0"; + hexpand: "true"; + + Overlay { + valign: center; + + [overlay] + Button btn_next { + margin-end: 12; + margin-start: 12; + icon-name: "go-next-symbolic"; + halign: end; + valign: center; + visible: false; + tooltip-text: _("Next"); + + styles [ + "circular", + "suggested-action", + ] + } + + $AdwStatusPage status_page { + icon-name: "vanilla-installer-harddisk-symbolic"; + title: _("Install Location"); + description: _("Select the disk where you want to install Vanilla OS. Alternatively, you can select one or more disks to configure manually."); + + $AdwPreferencesPage { + $AdwPreferencesGroup group_disks { + } + + $AdwPreferencesGroup { + Box { + halign: center; + spacing: 10; + + Button btn_auto { + label: _("Use entire disk"); + margin-top: 20; + halign: center; + sensitive: false; + + styles [ + "pill", + "suggested-action", + ] + } + + Button btn_manual { + label: _("Manual"); + margin-top: 20; + halign: center; + sensitive: false; + + styles [ + "pill", + ] + } + } + } + + $AdwPreferencesGroup { + styles [ + "error", + ] + + Box disk_space_err_box { + visible: false; + halign: center; + spacing: 5; + + Image { + icon-name: "drive-harddisk-symbolic"; + } + + Label disk_space_err_label { + label: _("You need at least %s of disk space to proceed with installation."); + } + } + } + } + } + } +} diff --git a/vanilla_installer/gtk/default-disk.ui b/vanilla_installer/gtk/default-disk.ui deleted file mode 100644 index b6cdd238..00000000 --- a/vanilla_installer/gtk/default-disk.ui +++ /dev/null @@ -1,100 +0,0 @@ - - - - - diff --git a/vanilla_installer/gtk/default-encryption.blp b/vanilla_installer/gtk/default-encryption.blp new file mode 100644 index 00000000..536dba02 --- /dev/null +++ b/vanilla_installer/gtk/default-encryption.blp @@ -0,0 +1,59 @@ +using Gtk 4.0; + +template $VanillaDefaultEncryption : $AdwBin { + halign: "0"; + valign: "0"; + hexpand: "true"; + + Overlay { + valign: center; + + [overlay] + Button btn_next { + margin-end: 12; + margin-start: 12; + icon-name: "go-next-symbolic"; + halign: end; + valign: center; + tooltip-text: _("Next"); + + styles [ + "circular", + "suggested-action", + ] + } + + $AdwStatusPage status_page { + icon-name: "channel-secure-symbolic"; + title: _("Device Encryption"); + description: _("Vanilla OS provides full-disk encryption through LUKS2 to protect your personal information in case your device gets stolen."); + + $AdwPreferencesPage { + $AdwPreferencesGroup { + $AdwActionRow { + title: _("Encrypt device"); + subtitle: _("Use a memorable password to encrypt your data"); + + [suffix] + Switch use_encryption_switch { + valign: center; + active: true; + } + + activatable-widget: "use_encryption_switch"; + } + + $AdwPasswordEntryRow encryption_pass_entry { + title: _("Password"); + sensitive: bind use_encryption_switch.active; + } + + $AdwPasswordEntryRow encryption_pass_entry_confirm { + title: _("Confirm Password"); + sensitive: bind use_encryption_switch.active; + } + } + } + } + } +} diff --git a/vanilla_installer/gtk/default-encryption.ui b/vanilla_installer/gtk/default-encryption.ui deleted file mode 100644 index 676680ca..00000000 --- a/vanilla_installer/gtk/default-encryption.ui +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - diff --git a/vanilla_installer/gtk/default-keyboard.blp b/vanilla_installer/gtk/default-keyboard.blp new file mode 100644 index 00000000..d2f370b8 --- /dev/null +++ b/vanilla_installer/gtk/default-keyboard.blp @@ -0,0 +1,74 @@ +using Gtk 4.0; + +template $VanillaDefaultKeyboard : $AdwBin { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + Box { + vexpand: true; + hexpand: true; + + Overlay { + valign: center; + + [overlay] + Button btn_next { + margin-end: 12; + margin-start: 12; + icon-name: "go-next-symbolic"; + halign: end; + valign: center; + tooltip-text: _("Next"); + + styles [ + "circular", + "suggested-action", + ] + } + + $AdwStatusPage status_page { + icon-name: "input-keyboard-symbolic"; + title: _("Keyboard Layout"); + description: _("Select your preferred keyboard layout"); + + $AdwClamp { + maximum-size: "570"; + + Box { + orientation: vertical; + + SearchEntry entry_search_keyboard { + hexpand: true; + placeholder-text: _("Search for a Keyboard Layout"); + } + + $AdwPreferencesGroup { + $AdwComboRow combo_layouts { + title: "Layout"; + model: + StringList str_list_layouts { + } + + ; + } + + $AdwComboRow combo_variants { + title: "Variant"; + model: + StringList str_list_variants { + } + + ; + } + + $AdwEntryRow entry_test { + title: "Test the Keyboard"; + } + } + } + } + } + } + } +} diff --git a/vanilla_installer/gtk/default-keyboard.ui b/vanilla_installer/gtk/default-keyboard.ui deleted file mode 100644 index 89fa560c..00000000 --- a/vanilla_installer/gtk/default-keyboard.ui +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/vanilla_installer/gtk/default-language.blp b/vanilla_installer/gtk/default-language.blp new file mode 100644 index 00000000..ea657be9 --- /dev/null +++ b/vanilla_installer/gtk/default-language.blp @@ -0,0 +1,61 @@ +using Gtk 4.0; + +template $VanillaDefaultLanguage : $AdwBin { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + Box { + vexpand: true; + hexpand: true; + + Overlay { + valign: center; + + [overlay] + Button btn_next { + margin-end: 12; + margin-start: 12; + icon-name: "go-next-symbolic"; + halign: end; + valign: center; + tooltip-text: _("Next"); + + styles [ + "circular", + "suggested-action", + ] + } + + $AdwStatusPage status_page { + icon-name: "preferences-desktop-locale-symbolic"; + title: _("Language"); + description: _("Select your language"); + + $AdwClamp { + maximum-size: "570"; + + Box { + orientation: vertical; + + SearchEntry entry_search_language { + hexpand: true; + placeholder-text: _("Search for a language"); + } + + $AdwPreferencesGroup { + $AdwComboRow combo_languages { + title: _("Language"); + model: + StringList str_list_languages { + } + + ; + } + } + } + } + } + } + } +} diff --git a/vanilla_installer/gtk/default-language.ui b/vanilla_installer/gtk/default-language.ui deleted file mode 100644 index a8dca6f8..00000000 --- a/vanilla_installer/gtk/default-language.ui +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/vanilla_installer/gtk/default-nvidia.blp b/vanilla_installer/gtk/default-nvidia.blp new file mode 100644 index 00000000..4b9dfd9c --- /dev/null +++ b/vanilla_installer/gtk/default-nvidia.blp @@ -0,0 +1,87 @@ +using Gtk 4.0; + +template $VanillaDefaultNvidia : $AdwBin { + halign: "0"; + valign: "0"; + hexpand: "true"; + + $AdwStatusPage status_page { + halign: "0"; + valign: "0"; + hexpand: "true"; + icon-name: "video-display-symbolic"; + title: _("NVIDIA® Drivers"); + description: _("Choose whether to install proprietary NVIDIA drivers for better compatibility and performance."); + + Box { + orientation: vertical; + vexpand: true; + hexpand: true; + valign: center; + + Box { + valign: center; + spacing: 10; + halign: center; + + Button btn_no { + label: _("Don\'t install"); + halign: center; + + styles [ + "pill", + ] + } + + Button btn_yes { + label: _("Install (recommended)"); + halign: center; + + styles [ + "pill", + "suggested-action", + ] + } + + Box { + Button btn_info { + icon-name: "dialog-information-symbolic"; + + styles [ + "flat", + ] + } + + Popover info_popover { + child: Box { + orientation: vertical; + spacing: 10; + vexpand: true; + halign: center; + margin-top: 10; + margin-bottom: 10; + margin-start: 10; + margin-end: 10; + + Label { + label: _("About Proprietary Drivers"); + + styles [ + "title-4", + ] + } + + Label { + label: _("A proprietary driver has private code that neither Vanilla OS nor Debian developers can review.\n\nSecurity and other updates are dependent on the driver vendor."); + wrap: true; + max-width-chars: 50; + } + } + + ; + } + } + } + } + } +} diff --git a/vanilla_installer/gtk/default-nvidia.ui b/vanilla_installer/gtk/default-nvidia.ui deleted file mode 100644 index 689c8fc0..00000000 --- a/vanilla_installer/gtk/default-nvidia.ui +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - diff --git a/vanilla_installer/gtk/default-theme.blp b/vanilla_installer/gtk/default-theme.blp new file mode 100644 index 00000000..cf9228db --- /dev/null +++ b/vanilla_installer/gtk/default-theme.blp @@ -0,0 +1,55 @@ +using Gtk 4.0; + +template $VanillaDefaultTheme : Box { + orientation: vertical; + halign: fill; + valign: center; + hexpand: true; + + Box { + valign: center; + spacing: 10; + halign: center; + + CheckButton btn_default { + tooltip-text: _("Default"); + halign: center; + active: true; + + styles [ + "theme-selector", + "light", + "card", + ] + } + + CheckButton btn_dark { + tooltip-text: _("Dark"); + halign: center; + + styles [ + "theme-selector", + "dark", + "card", + ] + } + } + + $AdwStatusPage { + title: _("Color Scheme"); + description: _("Choose a color scheme for your system"); + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + Button btn_next { + label: _("Next"); + halign: center; + + styles [ + "pill", + "suggested-action", + ] + } + } +} diff --git a/vanilla_installer/gtk/default-theme.ui b/vanilla_installer/gtk/default-theme.ui deleted file mode 100644 index fe14f984..00000000 --- a/vanilla_installer/gtk/default-theme.ui +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/vanilla_installer/gtk/default-timezone.blp b/vanilla_installer/gtk/default-timezone.blp new file mode 100644 index 00000000..dc2b25d2 --- /dev/null +++ b/vanilla_installer/gtk/default-timezone.blp @@ -0,0 +1,75 @@ +using Gtk 4.0; + +template $VanillaDefaultTimezone : $AdwBin { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + Box { + vexpand: true; + hexpand: true; + + Overlay { + valign: center; + + [overlay] + Button btn_next { + margin-end: 12; + margin-start: 12; + icon-name: "go-next-symbolic"; + halign: end; + valign: center; + tooltip-text: _("Next"); + + styles [ + "circular", + "suggested-action", + ] + } + + $AdwStatusPage status_page { + icon-name: "preferences-system-time-symbolic"; + title: _("Date & Time"); + description: _("Select your preferred timezone"); + + $AdwClamp { + maximum-size: "570"; + + Box { + orientation: vertical; + + SearchEntry entry_search_timezone { + hexpand: true; + placeholder-text: _("Search for a Timezone"); + } + + $AdwPreferencesGroup { + $AdwComboRow combo_region { + title: _("Region"); + model: + StringList str_list_region { + } + + ; + } + + $AdwComboRow combo_zone { + title: _("Zone"); + model: + StringList str_list_zone { + } + + ; + } + + $AdwActionRow row_preview { + title: "19:07:00"; + subtitle: "Saturday, 29 Oct 2022"; + } + } + } + } + } + } + } +} diff --git a/vanilla_installer/gtk/default-timezone.ui b/vanilla_installer/gtk/default-timezone.ui deleted file mode 100644 index e321a88b..00000000 --- a/vanilla_installer/gtk/default-timezone.ui +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/vanilla_installer/gtk/default-users.blp b/vanilla_installer/gtk/default-users.blp new file mode 100644 index 00000000..959c8f84 --- /dev/null +++ b/vanilla_installer/gtk/default-users.blp @@ -0,0 +1,67 @@ +using Gtk 4.0; + +template $VanillaDefaultUsers : $AdwBin { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + Overlay { + valign: center; + + [overlay] + Button btn_next { + margin-end: 12; + margin-start: 12; + icon-name: "go-next-symbolic"; + halign: end; + valign: center; + tooltip-text: _("Next"); + sensitive: false; + + styles [ + "circular", + "suggested-action", + ] + } + + Box { + orientation: vertical; + + $AdwAvatar { + valign: "center"; + size: "128"; + show-initials: "True"; + text: bind fullname_entry.text; + } + + $AdwStatusPage status_page { + title: _("Create User"); + description: _("Provide details for your user account"); + + $AdwPreferencesPage { + $AdwPreferencesGroup { + $AdwEntryRow fullname_entry { + title: _("Name"); + input-purpose: "name"; + } + + $AdwEntryRow username_entry { + title: _("Username"); + input-purpose: "name"; + } + + $AdwPasswordEntryRow password_entry { + title: _("Password"); + input-purpose: "password"; + } + + $AdwPasswordEntryRow password_confirmation { + title: _("Confirm Password"); + input-purpose: "password"; + } + } + } + } + } + } +} diff --git a/vanilla_installer/gtk/default-users.ui b/vanilla_installer/gtk/default-users.ui deleted file mode 100644 index 634b8e17..00000000 --- a/vanilla_installer/gtk/default-users.ui +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - diff --git a/vanilla_installer/gtk/default-welcome.blp b/vanilla_installer/gtk/default-welcome.blp new file mode 100644 index 00000000..0c1f6e6c --- /dev/null +++ b/vanilla_installer/gtk/default-welcome.blp @@ -0,0 +1,44 @@ +using Gtk 4.0; + +template $VanillaDefaultWelcome : $AdwBin { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + $AdwStatusPage status_page { + Box { + orientation: vertical; + valign: center; + halign: center; + + Image { + icon-name: "vanilla-logo-text"; + pixel-size: 200; + } + + Box { + spacing: 10; + valign: center; + halign: center; + margin-bottom: 60; + + Button btn_recovery { + label: _("Recovery"); + + styles [ + "pill", + ] + } + + Button btn_install { + label: _("Install Vanilla OS"); + + styles [ + "pill", + "suggested-action", + ] + } + } + } + } +} diff --git a/vanilla_installer/gtk/default-welcome.ui b/vanilla_installer/gtk/default-welcome.ui deleted file mode 100644 index 4905634c..00000000 --- a/vanilla_installer/gtk/default-welcome.ui +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/vanilla_installer/gtk/dialog-disk-confirm.blp b/vanilla_installer/gtk/dialog-disk-confirm.blp new file mode 100644 index 00000000..3bc5da44 --- /dev/null +++ b/vanilla_installer/gtk/dialog-disk-confirm.blp @@ -0,0 +1,43 @@ +using Gtk 4.0; + +template $VanillaDefaultDiskConfirmModal : $AdwWindow { + title: _("Confirm Changes"); + modal: "true"; + deletable: "false"; + default-width: "500"; + default-height: "450"; + + Box { + orientation: vertical; + + $AdwHeaderBar { + [start] + Button btn_cancel { + label: _("Cancel"); + } + } + + $AdwStatusPage { + title: _("Confirm Changes"); + description: _("The following changes will be made to your disk. Please review them carefully."); + + $AdwPreferencesPage { + $AdwPreferencesGroup group_partitions { + } + + $AdwPreferencesGroup { + Button btn_apply { + label: _("Confirm Changes"); + valign: center; + halign: center; + + styles [ + "destructive-action", + "pill", + ] + } + } + } + } + } +} diff --git a/vanilla_installer/gtk/dialog-disk-confirm.ui b/vanilla_installer/gtk/dialog-disk-confirm.ui deleted file mode 100644 index c2416350..00000000 --- a/vanilla_installer/gtk/dialog-disk-confirm.ui +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - diff --git a/vanilla_installer/gtk/dialog-disk.blp b/vanilla_installer/gtk/dialog-disk.blp new file mode 100644 index 00000000..91d65042 --- /dev/null +++ b/vanilla_installer/gtk/dialog-disk.blp @@ -0,0 +1,32 @@ +using Gtk 4.0; + +template $VanillaDefaultDiskPartModal : $AdwWindow { + title: _("Configure Disk"); + modal: "true"; + deletable: "false"; + default-width: "650"; + default-height: "850"; + + Box { + orientation: vertical; + + $AdwHeaderBar { + [start] + Button btn_cancel { + label: _("Cancel"); + } + + [end] + Button btn_apply { + label: _("Apply"); + + styles [ + "suggested-action", + ] + } + } + + $AdwToastOverlay group_partitions { + } + } +} diff --git a/vanilla_installer/gtk/dialog-disk.ui b/vanilla_installer/gtk/dialog-disk.ui deleted file mode 100644 index fcd2f79e..00000000 --- a/vanilla_installer/gtk/dialog-disk.ui +++ /dev/null @@ -1,36 +0,0 @@ - - - - - diff --git a/vanilla_installer/gtk/dialog-output.blp b/vanilla_installer/gtk/dialog-output.blp new file mode 100644 index 00000000..84419273 --- /dev/null +++ b/vanilla_installer/gtk/dialog-output.blp @@ -0,0 +1,15 @@ +using Gtk 4.0; + +template $VanillaDialogOutput : $AdwWindow { + title: _("Log"); + modal: "true"; + default-width: "500"; + default-height: "450"; + + Box main_box { + orientation: vertical; + + $AdwHeaderBar { + } + } +} diff --git a/vanilla_installer/gtk/dialog-output.ui b/vanilla_installer/gtk/dialog-output.ui deleted file mode 100644 index cd842b74..00000000 --- a/vanilla_installer/gtk/dialog-output.ui +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/vanilla_installer/gtk/dialog-recovery.blp b/vanilla_installer/gtk/dialog-recovery.blp new file mode 100644 index 00000000..1ec9bed3 --- /dev/null +++ b/vanilla_installer/gtk/dialog-recovery.blp @@ -0,0 +1,89 @@ +using Gtk 4.0; + +template $VanillaRecoveryDialog : $AdwWindow { + title: _("Recovery"); + default-width: "500"; + modal: "true"; + + Box { + orientation: vertical; + + $AdwHeaderBar { + styles [ + "flat", + ] + } + + $AdwPreferencesPage { + $AdwPreferencesGroup { + $AdwActionRow row_console { + icon-name: "utilities-terminal-symbolic"; + title: _("Console"); + subtitle: _("Open a Terminal"); + activatable: "true"; + + [suffix] + Image { + icon-name: "go-next-symbolic"; + valign: center; + + styles [ + "flat", + ] + } + } + + $AdwActionRow row_gparted { + icon-name: "drive-harddisk-symbolic"; + title: _("Gparted"); + subtitle: _("Manage disks and partitions"); + activatable: "true"; + + [suffix] + Image { + icon-name: "go-next-symbolic"; + valign: center; + + styles [ + "flat", + ] + } + } + + $AdwActionRow row_handbook { + icon-name: "help-browser-symbolic"; + title: _("Handbook"); + subtitle: _("Read the Vanilla OS Handbook"); + activatable: "true"; + + [suffix] + Image { + icon-name: "go-next-symbolic"; + valign: center; + + styles [ + "flat", + ] + } + } + + $AdwActionRow row_web { + icon-name: "web-browser-symbolic"; + title: _("Web Browser"); + subtitle: _("Search online for help"); + activatable: "true"; + + [suffix] + Image { + icon-name: "go-next-symbolic"; + valign: center; + + styles [ + "flat", + ] + } + } + } + } + } +} diff --git a/vanilla_installer/gtk/dialog-recovery.ui b/vanilla_installer/gtk/dialog-recovery.ui deleted file mode 100644 index 25d1ea80..00000000 --- a/vanilla_installer/gtk/dialog-recovery.ui +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - diff --git a/vanilla_installer/gtk/dialog.blp b/vanilla_installer/gtk/dialog.blp new file mode 100644 index 00000000..9e20e368 --- /dev/null +++ b/vanilla_installer/gtk/dialog.blp @@ -0,0 +1,25 @@ +using Gtk 4.0; + +template $VanillaDialog : $AdwWindow { + title: _("Showing Information"); + default-width: "500"; + modal: "True"; + + Box { + orientation: vertical; + + $AdwHeaderBar { + styles [ + "flat", + ] + } + + Label label_text { + margin-top: 10; + margin-start: 10; + margin-end: 10; + margin-bottom: 20; + wrap: true; + } + } +} diff --git a/vanilla_installer/gtk/dialog.ui b/vanilla_installer/gtk/dialog.ui deleted file mode 100644 index a63f29a9..00000000 --- a/vanilla_installer/gtk/dialog.ui +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - diff --git a/vanilla_installer/gtk/done.blp b/vanilla_installer/gtk/done.blp new file mode 100644 index 00000000..2e3d9fd1 --- /dev/null +++ b/vanilla_installer/gtk/done.blp @@ -0,0 +1,51 @@ +using Gtk 4.0; + +template $VanillaDone : $AdwBin { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + $AdwStatusPage status_page { + icon-name: "emblem-default-symbolic"; + title: _("All done!"); + description: _("Restart your device to enjoy your Vanilla OS experience"); + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + Box { + halign: center; + spacing: 10; + + Button btn_log { + label: _("Show Log"); + halign: center; + + styles [ + "pill", + ] + } + + Button btn_reboot { + label: _("Reboot Now"); + halign: center; + + styles [ + "pill", + "suggested-action", + ] + } + + Button btn_close { + label: _("Close"); + halign: center; + visible: false; + + styles [ + "pill", + "suggested-action", + ] + } + } + } +} diff --git a/vanilla_installer/gtk/done.ui b/vanilla_installer/gtk/done.ui deleted file mode 100644 index c82bcdd0..00000000 --- a/vanilla_installer/gtk/done.ui +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - diff --git a/vanilla_installer/gtk/layout-preferences.blp b/vanilla_installer/gtk/layout-preferences.blp new file mode 100644 index 00000000..722b7aec --- /dev/null +++ b/vanilla_installer/gtk/layout-preferences.blp @@ -0,0 +1,35 @@ +using Gtk 4.0; + +template $VanillaLayoutPreferences : $AdwBin { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + $AdwStatusPage status_page { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + Box { + orientation: vertical; + vexpand: true; + hexpand: true; + valign: center; + + $AdwPreferencesPage { + $AdwPreferencesGroup prefs_list { + } + } + + Button btn_next { + label: _("Next"); + halign: center; + + styles [ + "pill", + "suggested-action", + ] + } + } + } +} diff --git a/vanilla_installer/gtk/layout-preferences.ui b/vanilla_installer/gtk/layout-preferences.ui deleted file mode 100644 index c6de76ae..00000000 --- a/vanilla_installer/gtk/layout-preferences.ui +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/vanilla_installer/gtk/layout-yes-no.blp b/vanilla_installer/gtk/layout-yes-no.blp new file mode 100644 index 00000000..13c880b5 --- /dev/null +++ b/vanilla_installer/gtk/layout-yes-no.blp @@ -0,0 +1,54 @@ +using Gtk 4.0; + +template $VanillaLayoutYesNo : $AdwBin { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + $AdwStatusPage status_page { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + Box { + orientation: vertical; + vexpand: true; + hexpand: true; + valign: center; + + Box { + valign: center; + spacing: 10; + halign: center; + + Button btn_no { + label: "No"; + halign: center; + + styles [ + "pill", + ] + } + + Button btn_yes { + label: _("Yes, enable it"); + halign: center; + + styles [ + "pill", + "suggested-action", + ] + } + + Button btn_info { + icon-name: "dialog-information-symbolic"; + visible: false; + + styles [ + "flat", + ] + } + } + } + } +} diff --git a/vanilla_installer/gtk/layout-yes-no.ui b/vanilla_installer/gtk/layout-yes-no.ui deleted file mode 100644 index 0973f1fd..00000000 --- a/vanilla_installer/gtk/layout-yes-no.ui +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/vanilla_installer/gtk/progress.blp b/vanilla_installer/gtk/progress.blp new file mode 100644 index 00000000..a8e6b75f --- /dev/null +++ b/vanilla_installer/gtk/progress.blp @@ -0,0 +1,114 @@ +using Gtk 4.0; + +template $VanillaProgress : Box { + orientation: vertical; + + Box tour_box { + visible: true; + margin-start: 40; + margin-end: 40; + margin-top: 1; + margin-bottom: 18; + height-request: 550; + orientation: vertical; + + $AdwCarousel carousel_tour { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + vexpand: "true"; + allow-scroll-wheel: "False"; + allow-mouse-drag: "False"; + allow-long-swipes: "False"; + } + + $AdwCarouselIndicatorDots { + carousel: "carousel_tour"; + orientation: "horizontal"; + margin-bottom: "18"; + } + } + + Box console_box { + visible: false; + margin-start: 40; + margin-end: 40; + margin-top: 1; + margin-bottom: 18; + height-request: 550; + orientation: vertical; + + Box console_output { + visible: true; + margin-top: 12; + margin-start: 12; + margin-end: 12; + orientation: vertical; + } + + styles [ + "card", + ] + } + + Box { + orientation: horizontal; + + Label progressbar_text { + wrap: true; + wrap-mode: word_char; + halign: start; + valign: center; + margin-top: 40; + margin-start: 40; + label: _("Installing..."); + + styles [ + "title-4", + ] + } + + Box { + halign: fill; + hexpand: true; + } + + Button console_button { + visible: true; + margin-end: 40; + margin-start: 12; + margin-top: 40; + icon-name: "media-view-subtitles-symbolic"; + halign: end; + valign: center; + tooltip-text: _("Show Console output"); + + styles [ + "circular", + ] + } + + Button tour_button { + visible: false; + margin-end: 40; + margin-start: 12; + margin-top: 40; + icon-name: "image-x-generic-symbolic"; + halign: end; + valign: center; + tooltip-text: _("Show Slideshow"); + + styles [ + "circular", + ] + } + } + + ProgressBar progressbar { + show-text: false; + margin-top: 12; + margin-start: 40; + margin-bottom: 40; + margin-end: 40; + } +} diff --git a/vanilla_installer/gtk/progress.ui b/vanilla_installer/gtk/progress.ui deleted file mode 100644 index 07b3c5c1..00000000 --- a/vanilla_installer/gtk/progress.ui +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - diff --git a/vanilla_installer/gtk/tour.blp b/vanilla_installer/gtk/tour.blp new file mode 100644 index 00000000..ec9d5c70 --- /dev/null +++ b/vanilla_installer/gtk/tour.blp @@ -0,0 +1,17 @@ +using Gtk 4.0; + +template $VanillaTour : $AdwBin { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + $AdwStatusPage status_page { + halign: "fill"; + valign: "fill"; + hexpand: "true"; + + Picture assets_svg { + can-shrink: false; + } + } +} diff --git a/vanilla_installer/gtk/tour.ui b/vanilla_installer/gtk/tour.ui deleted file mode 100644 index 562cd3bb..00000000 --- a/vanilla_installer/gtk/tour.ui +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/vanilla_installer/gtk/widget-choice-expander.blp b/vanilla_installer/gtk/widget-choice-expander.blp new file mode 100644 index 00000000..cb29fd42 --- /dev/null +++ b/vanilla_installer/gtk/widget-choice-expander.blp @@ -0,0 +1,11 @@ +using Gtk 4.0; + +template $VanillaChoiceExpanderEntry : $AdwExpanderRow { + title: "Choice Name"; + subtitle: "-Choice Description"; + + [prefix] + Image img_choice { + valign: center; + } +} diff --git a/vanilla_installer/gtk/widget-choice-expander.ui b/vanilla_installer/gtk/widget-choice-expander.ui deleted file mode 100644 index 07944cb3..00000000 --- a/vanilla_installer/gtk/widget-choice-expander.ui +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/vanilla_installer/gtk/widget-choice.blp b/vanilla_installer/gtk/widget-choice.blp new file mode 100644 index 00000000..684e1ed6 --- /dev/null +++ b/vanilla_installer/gtk/widget-choice.blp @@ -0,0 +1,11 @@ +using Gtk 4.0; + +template $VanillaChoiceEntry : $AdwActionRow { + title: "Choice Name"; + subtitle: "-Choice Description"; + + [prefix] + Image img_choice { + valign: center; + } +} diff --git a/vanilla_installer/gtk/widget-choice.ui b/vanilla_installer/gtk/widget-choice.ui deleted file mode 100644 index 37dea942..00000000 --- a/vanilla_installer/gtk/widget-choice.ui +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/vanilla_installer/gtk/widget-disk.blp b/vanilla_installer/gtk/widget-disk.blp new file mode 100644 index 00000000..e4e59425 --- /dev/null +++ b/vanilla_installer/gtk/widget-disk.blp @@ -0,0 +1,13 @@ +using Gtk 4.0; + +template $VanillaDefaultDiskEntry : $AdwActionRow { + title: "/dev/unit"; + subtitle: "-1 GB"; + + [prefix] + CheckButton chk_button { + valign: center; + } + + activatable-widget: "chk_button"; +} diff --git a/vanilla_installer/gtk/widget-disk.ui b/vanilla_installer/gtk/widget-disk.ui deleted file mode 100644 index 1d040723..00000000 --- a/vanilla_installer/gtk/widget-disk.ui +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/vanilla_installer/gtk/widget-partition-row.blp b/vanilla_installer/gtk/widget-partition-row.blp new file mode 100644 index 00000000..2fa86c84 --- /dev/null +++ b/vanilla_installer/gtk/widget-partition-row.blp @@ -0,0 +1,13 @@ +using Gtk 4.0; + +template $PartitionRow : $AdwActionRow { + [prefix] + CheckButton select_button { + } + + activatable-widget: "select_button"; + + [suffix] + $AdwBin suffix_bin { + } +} diff --git a/vanilla_installer/gtk/widget-partition-row.ui b/vanilla_installer/gtk/widget-partition-row.ui deleted file mode 100644 index 7ad54c3f..00000000 --- a/vanilla_installer/gtk/widget-partition-row.ui +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/vanilla_installer/gtk/widget-partition.blp b/vanilla_installer/gtk/widget-partition.blp new file mode 100644 index 00000000..89d24a4e --- /dev/null +++ b/vanilla_installer/gtk/widget-partition.blp @@ -0,0 +1,189 @@ +using Gtk 4.0; + +template $PartitionSelector : $AdwPreferencesPage { + $AdwPreferencesGroup open_gparted_group { + $AdwActionRow open_gparted_row { + icon-name: "vanilla-installer-harddisk-symbolic"; + title: _("Open GParted"); + subtitle: _("Open GParted to manually partition the disk"); + + [suffix] + Button launch_gparted { + icon-name: "adw-external-link-symbolic"; + valign: center; + halign: center; + + styles [ + "circular", + ] + } + + activatable-widget: "launch_gparted"; + } + } + + $AdwPreferencesGroup boot_part { + title: _("Boot Partition"); + description: _("The partition to mount under “/boot”. This directory stores files for booting in Vanilla OS."); + + $AdwExpanderRow boot_part_expand { + title: _("No partition selected"); + subtitle: _("Please select a partition from the options below"); + } + } + + $AdwPreferencesGroup boot_small_error { + styles [ + "error", + ] + + visible: "false"; + title: _("Boot partition is too small."); + } + + $AdwPreferencesGroup efi_part { + title: _("EFI Partition"); + description: _("The partition to mount under “/boot/efi”. This directory stores files for booting in the bootloader."); + + $AdwExpanderRow efi_part_expand { + title: _("No partition selected"); + subtitle: _("Please select a partition from the options below"); + } + } + + $AdwPreferencesGroup efi_small_error { + styles [ + "error", + ] + + visible: "false"; + title: _("EFI partition is too small."); + } + + $AdwPreferencesGroup bios_part { + title: _("BIOS Boot Partition"); + description: _("The partition required by GPT-formatted disks to support booting from BIOS systems. It must be located in the first 2 TB of the disk and must be exactly 1 Mebibyte (1 MiB)."); + + $AdwExpanderRow bios_part_expand { + title: _("No partition selected"); + subtitle: _("Please select a partition from the options below"); + } + } + + $AdwPreferencesGroup bios_small_error { + styles [ + "error", + ] + + visible: "false"; + title: _("BIOS partition must be exactly 1 MiB."); + } + + $AdwPreferencesGroup roots_part { + title: _("Root Partitions"); + description: _("The partitions to mount under “/”. Both partitions must be the same size."); + + [header-suffix] + Box { + Button abroot_info_button { + valign: center; + icon-name: "info-symbolic"; + } + + Popover abroot_info_popover { + Label { + label: _("Vanilla OS uses an A/B partition system managed by ABRoot,\nwhich switches between two root partitions between updates."); + } + } + } + + $AdwExpanderRow abroot_a_part_expand { + [prefix] + Label { + styles [ + "heading", + ] + + label: "A"; + } + + title: _("No partition selected"); + subtitle: _("Please select a partition from the options below"); + } + + $AdwExpanderRow abroot_b_part_expand { + [prefix] + Label { + styles [ + "heading", + ] + + label: "B"; + } + + title: _("No partition selected"); + subtitle: _("Please select a partition from the options below"); + } + } + + $AdwPreferencesGroup root_sizes_differ_error { + styles [ + "error", + ] + + visible: "false"; + title: _("Root partitions are not the same size."); + description: _("Please make sure your A and B partitions have the same disk space."); + } + + $AdwPreferencesGroup roots_small_error { + styles [ + "error", + ] + + visible: "false"; + title: _("Root partitions are too small."); + } + + $AdwPreferencesGroup home_part { + title: _("Home Partition"); + description: _("The partition to mount under “/home”. This directory stores all user data."); + + $AdwExpanderRow home_part_expand { + title: _("No partition selected"); + subtitle: _("Please select a partition from the options below"); + } + } + + $AdwPreferencesGroup home_small_error { + styles [ + "error", + ] + + visible: "false"; + title: _("Home partition is too small."); + } + + $AdwPreferencesGroup swap_part { + title: _("Swap Partition"); + description: _("Swap acts as a virtual extension of your RAM and enables hibernation. Vanilla OS already uses zram to provide swapping at no storage cost."); + + $AdwActionRow { + title: _("Swap Partition"); + subtitle: _("Choose a partition to use for swap alongside zram. This is not required for hibernation."); + + [suffix] + Switch use_swap_part { + valign: center; + } + + activatable-widget: "use_swap_part"; + } + + $AdwExpanderRow swap_part_expand { + visible: bind use_swap_part.active; + title: _("No partition selected"); + subtitle: _("Please select a partition from the options below"); + } + } +} diff --git a/vanilla_installer/gtk/widget-partition.ui b/vanilla_installer/gtk/widget-partition.ui deleted file mode 100644 index 660e2e8d..00000000 --- a/vanilla_installer/gtk/widget-partition.ui +++ /dev/null @@ -1,210 +0,0 @@ - - - - - diff --git a/vanilla_installer/gtk/window.blp b/vanilla_installer/gtk/window.blp new file mode 100644 index 00000000..789a97b5 --- /dev/null +++ b/vanilla_installer/gtk/window.blp @@ -0,0 +1,62 @@ +using Gtk 4.0; + +template $VanillaWindow : $AdwApplicationWindow { + default-width: "900"; + default-height: "680"; + title: _("Vanilla OS Installer"); + + Box { + orientation: vertical; + + $AdwHeaderBar { + show-end-title-buttons: "False"; + + styles [ + "flat", + ] + title-widget: + $AdwCarouselIndicatorDots carousel_indicator_dots { + carousel: "carousel"; + orientation: "horizontal"; + visible: "False"; + } + + ; + } + + Overlay { + valign: center; + + [overlay] + Button btn_back { + visible: false; + margin-start: 12; + margin-end: 12; + icon-name: "go-previous-symbolic"; + halign: start; + valign: center; + tooltip-text: _("Back"); + + styles [ + "circular", + ] + } + + Box { + orientation: horizontal; + vexpand: true; + hexpand: true; + + $AdwToastOverlay toasts { + $AdwCarousel carousel { + vexpand: "True"; + hexpand: "True"; + allow-scroll-wheel: "False"; + allow-mouse-drag: "False"; + allow-long-swipes: "False"; + } + } + } + } + } +} diff --git a/vanilla_installer/gtk/window.ui b/vanilla_installer/gtk/window.ui deleted file mode 100644 index 6c1380b0..00000000 --- a/vanilla_installer/gtk/window.ui +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - diff --git a/vanilla_installer/meson.build b/vanilla_installer/meson.build index f9afaa5b..172933c3 100644 --- a/vanilla_installer/meson.build +++ b/vanilla_installer/meson.build @@ -2,11 +2,45 @@ pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.proje moduledir = join_paths(pkgdatadir, 'vanilla_installer') gnome = import('gnome') +blueprints = custom_target('blueprints', + input: files( + 'gtk/confirm.blp', + 'gtk/default-keyboard.blp', + 'gtk/default-language.blp', + 'gtk/default-theme.blp', + 'gtk/default-timezone.blp', + 'gtk/default-users.blp', + 'gtk/dialog-disk-confirm.blp', + 'gtk/dialog-disk.blp', + 'gtk/dialog-output.blp', + 'gtk/dialog.blp', + 'gtk/done.blp', + 'gtk/layout-preferences.blp', + 'gtk/layout-yes-no.blp', + 'gtk/progress.blp', + 'gtk/tour.blp', + 'gtk/widget-choice-expander.blp', + 'gtk/widget-choice.blp', + 'gtk/widget-disk.blp', + 'gtk/widget-partition-row.blp', + 'gtk/window.blp', + 'gtk/default-welcome.blp', + 'gtk/default-disk.blp', + 'gtk/default-encryption.blp', + 'gtk/default-nvidia.blp', + 'gtk/dialog-recovery.blp', + 'gtk/widget-partition.blp', + ), + output: '.', + command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'], +) + gnome.compile_resources('vanilla-installer', 'vanilla-installer.gresource.xml', gresource_bundle: true, install: true, install_dir: pkgdatadir, + dependencies: blueprints, ) python = import('python')