From 709070da1f2c6bc449de1a9315342ea7e19cd376 Mon Sep 17 00:00:00 2001 From: Peter Eisenmann Date: Mon, 8 Jul 2024 21:03:12 +0200 Subject: [PATCH] general: Use scrolling of wrapper more --- data/resources/ui/pages/choices.blp | 14 +- data/resources/ui/pages/disk.blp | 44 ++- data/resources/ui/pages/keyboard_language.blp | 15 +- data/resources/ui/pages/keyboard_overview.blp | 72 ++-- data/resources/ui/pages/partition.blp | 247 ++++++------- data/resources/ui/pages/summary.blp | 340 +++++++++--------- 6 files changed, 348 insertions(+), 384 deletions(-) diff --git a/data/resources/ui/pages/choices.blp b/data/resources/ui/pages/choices.blp index 36bc738..5824b64 100644 --- a/data/resources/ui/pages/choices.blp +++ b/data/resources/ui/pages/choices.blp @@ -5,15 +5,11 @@ template $ChoicesPage : Box { orientation: vertical; spacing: 12; - ScrolledWindow { - propagate-natural-height: true; - styles ["embedded", "separate-bottom"] - child: ListBox list { - hexpand: true; - selection-mode: none; - styles ["boxed-list"] - }; - } + ListBox list { + hexpand: true; + selection-mode: none; + styles ["boxed-list"] +} Button { /* Translators: On button. */ diff --git a/data/resources/ui/pages/disk.blp b/data/resources/ui/pages/disk.blp index 9665137..3f381e7 100644 --- a/data/resources/ui/pages/disk.blp +++ b/data/resources/ui/pages/disk.blp @@ -12,32 +12,28 @@ template $DiskPage : Stack { orientation: vertical; spacing: 12; - ScrolledWindow { - propagate-natural-height: true; - styles ["embedded", "separate-bottom"] - child: Box { - orientation: vertical; - spacing: 12; + Box { + orientation: vertical; + spacing: 12; - ListBox disk_list { - selection-mode: none; - receives-default: true; - valign: start; - row-activated => $disk_selected(); - styles ["boxed-list"] - } + ListBox disk_list { + selection-mode: none; + receives-default: true; + valign: start; + row-activated => $disk_selected(); + styles ["boxed-list"] + } - Button { - /* Translators: Button label to open disk management tool. */ - label: _("_Manage Disks"); - focusable: true; - halign: center; - valign: end; - use-underline: true; - clicked => $clicked_disks_button(); - styles ["pill", "bottom-button"] - } - }; + Button { + /* Translators: Button label to open disk management tool. */ + label: _("_Manage Disks"); + focusable: true; + halign: center; + valign: end; + use-underline: true; + clicked => $clicked_disks_button(); + styles ["pill", "bottom-button"] + } } }; } diff --git a/data/resources/ui/pages/keyboard_language.blp b/data/resources/ui/pages/keyboard_language.blp index aa726d6..c3f0e05 100644 --- a/data/resources/ui/pages/keyboard_language.blp +++ b/data/resources/ui/pages/keyboard_language.blp @@ -6,16 +6,11 @@ template $KeyboardLanguagePage : Box { orientation: vertical; spacing: 12; - ScrolledWindow { - propagate-natural-height: true; - valign: start; - styles ["embedded"] - child: ListBox list { - hexpand: true; - selection-mode: none; - row-activated => $language_row_activated(); - styles ["boxed-list", "bottom-spacing"] - }; + ListBox list { + hexpand: true; + selection-mode: none; + row-activated => $language_row_activated(); + styles ["boxed-list", "bottom-spacing"] } } diff --git a/data/resources/ui/pages/keyboard_overview.blp b/data/resources/ui/pages/keyboard_overview.blp index 261308c..a32f8ef 100644 --- a/data/resources/ui/pages/keyboard_overview.blp +++ b/data/resources/ui/pages/keyboard_overview.blp @@ -5,52 +5,48 @@ template $KeyboardOverviewPage : Box { orientation: vertical; spacing: 12; - ScrolledWindow { - propagate-natural-height: true; - styles ["embedded"] - child: Box { - orientation: vertical; - spacing: 12; + Box { + orientation: vertical; + spacing: 12; - /* selected layouts */ - ListBox { - selection-mode: none; - styles ["boxed-list"] + /* selected layouts */ + ListBox { + selection-mode: none; + styles ["boxed-list"] - Adw.ActionRow primary_layout_row { - activatable: true; - focusable: true; - /*selectable: false; */ - activated => $show_layout_selection(); + Adw.ActionRow primary_layout_row { + activatable: true; + focusable: true; + /*selectable: false; */ + activated => $show_layout_selection(); - Image { - icon-name: "emblem-system-symbolic"; - } + Image { + icon-name: "emblem-system-symbolic"; } } + } - /* test entry */ - ListBox { - selection-mode: none; - styles ["boxed-list"] + /* test entry */ + ListBox { + selection-mode: none; + styles ["boxed-list"] - Adw.EntryRow { - activatable: true; - /* Translators: Used as placeholder in a entry field to try out a keyboard layout */ - title: _("Test the Keyboard Layout Here"); - entry-activated => $continue(); - } + Adw.EntryRow { + activatable: true; + /* Translators: Used as placeholder in a entry field to try out a keyboard layout */ + title: _("Test the Keyboard Layout Here"); + entry-activated => $continue(); } + } - Button continue_button { - /* Translators: On button. */ - label: _("_Continue"); - halign: center; - receives-default: true; - use-underline: true; - clicked => $continue(); - styles ["suggested-action", "pill", "bottom-button"] - } - }; + Button continue_button { + /* Translators: On button. */ + label: _("_Continue"); + halign: center; + receives-default: true; + use-underline: true; + clicked => $continue(); + styles ["suggested-action", "pill", "bottom-button"] + } } } diff --git a/data/resources/ui/pages/partition.blp b/data/resources/ui/pages/partition.blp index f252e16..329fd91 100644 --- a/data/resources/ui/pages/partition.blp +++ b/data/resources/ui/pages/partition.blp @@ -6,141 +6,132 @@ template $PartitionPage : Box { orientation: vertical; spacing: 12; - ScrolledWindow { - propagate-natural-height: true; - styles ["embedded"] - child: Box { - orientation: vertical; - spacing: 12; + ListBox { + selection-mode: none; + row-activated => $use_whole_disk(); + styles ["boxed-list"] - ListBox { - selection-mode: none; - row-activated => $use_whole_disk(); - styles ["boxed-list"] + Adw.ActionRow whole_disk_row { + /* Translators: Label to use whole disk rather than a single partition. */ + title: _("Use Whole Disk"); + activatable: true; + focusable: true; + /*selectable: false; */ - Adw.ActionRow whole_disk_row { - /* Translators: Label to use whole disk rather than a single partition. */ - title: _("Use Whole Disk"); - activatable: true; - focusable: true; - /*selectable: false; */ + [prefix] + Label disk_size { + width-chars: 5; + max-width-chars: 7; + xalign: 1; + styles ["dim-label"] + } - [prefix] - Label disk_size { - width-chars: 5; - max-width-chars: 7; - xalign: 1; + Image { + icon-name: "go-next-symbolic"; + } + } + } + + Stack partition_stack { + vhomogeneous: false; + transition-type: crossfade; + + StackPage { + name: "available"; + child: Box { + orientation: vertical; + spacing: 12; + + Label { + /*Translators: Heading of list of partitions*/ + label: _("Partitions"); + justify: center; + wrap: true; + styles ["heading"] + } + + ListBox partition_list { + receives-default: true; + valign: start; + row-activated => $use_partition(); + styles ["boxed-list", "bottom-spacing"] + } + }; + } + + StackPage { + name: "no-partitions"; + /* TODO: could probably use some more love */ + child: Label { + valign: start; + justify: center; + label: _("Disk has no partitions."); + }; + } + + StackPage { + name: "no-boot-partition"; + child: Box { + margin-start: 18; + margin-end: 18; + margin-top: 6; + margin-bottom: 6; + spacing: 18; + halign: center; + + Image { + icon-name: "dialog-information-symbolic"; + styles ["dim-label"] + } + + 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; styles ["dim-label"] } - Image { - icon-name: "go-next-symbolic"; + Label { + /* Translators: Followed by a list of requirements */ + label: _("The disk requires:"); + wrap: true; + xalign: 0; + styles ["dim-label"] + } + + Stack { + hhomogeneous: false; + vhomogeneous: false; + + StackPage { + name: "efi"; + child: Label { + /* Translators: Bullet point listing. */ + label: _(" • GPT partitioning\n • EFI partition"); + wrap: true; + xalign: 0; + styles ["dim-label"] + }; + } + + StackPage { + name: "bios"; + child: Label { + /* Translators: Bullet point listing. */ + label: _(" • BIOS boot partition"); + wrap: true; + xalign: 0; + styles ["dim-label"] + }; + } } } - } - - Stack partition_stack { - vhomogeneous: false; - transition-type: crossfade; - - StackPage { - name: "available"; - child: Box { - orientation: vertical; - spacing: 12; - - Label { - /*Translators: Heading of list of partitions*/ - label: _("Partitions"); - justify: center; - wrap: true; - styles ["heading"] - } - - ListBox partition_list { - receives-default: true; - valign: start; - row-activated => $use_partition(); - styles ["boxed-list", "bottom-spacing"] - } - }; - } - - StackPage { - name: "no-partitions"; - /* TODO: could probably use some more love */ - child: Label { - valign: start; - justify: center; - label: _("Disk has no partitions."); - }; - } - - StackPage { - name: "no-boot-partition"; - child: Box { - margin-start: 18; - margin-end: 18; - margin-top: 6; - margin-bottom: 6; - spacing: 18; - halign: center; - - Image { - icon-name: "dialog-information-symbolic"; - styles ["dim-label"] - } - - 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; - styles ["dim-label"] - } - - Label { - /* Translators: Followed by a list of requirements */ - label: _("The disk requires:"); - wrap: true; - xalign: 0; - styles ["dim-label"] - } - - Stack { - hhomogeneous: false; - vhomogeneous: false; - - StackPage { - name: "efi"; - child: Label { - /* Translators: Bullet point listing. */ - label: _(" • GPT partitioning\n • EFI partition"); - wrap: true; - xalign: 0; - styles ["dim-label"] - }; - } - - StackPage { - name: "bios"; - child: Label { - /* Translators: Bullet point listing. */ - label: _(" • BIOS boot partition"); - wrap: true; - xalign: 0; - styles ["dim-label"] - }; - } - } - } - }; - } - } - }; + }; + } } } diff --git a/data/resources/ui/pages/summary.blp b/data/resources/ui/pages/summary.blp index 8a873fa..fb8829b 100644 --- a/data/resources/ui/pages/summary.blp +++ b/data/resources/ui/pages/summary.blp @@ -5,201 +5,191 @@ template $SummaryPage : Box { orientation: vertical; spacing: 12; - ScrolledWindow { - propagate-natural-height: true; - styles ["embedded", "separate-bottom"] + ListBox { + hexpand: true; + selection-mode: none; + row-activated => $summary_row_activated(); + styles ["boxed-list"] - child: Box { - orientation: vertical; - spacing: 12; + Adw.ActionRow language_row { + name: "language"; + activatable: true; + /* Translators: Description of selected language. */ + title: _("Language"); + styles ["property"] - ListBox { + Image { + icon-name: "go-next-symbolic"; + } + } + + Adw.ActionRow keyboard_row { + name: "keyboard-overview"; + activatable: true; + /* Translators: Description of selected keyboard layout. */ + title: _("Keyboard Layout"); + styles ["property"] + + Image { + icon-name: "go-next-symbolic"; + } + } + + Adw.ActionRow user_row { + name: "user"; + activatable: true; + /* Translators: Description of defined user account name and autologin status. */ + title: _("User Account"); + styles ["property"] + + Label user_autologin { + halign: fill; hexpand: true; - selection-mode: none; - row-activated => $summary_row_activated(); - styles ["boxed-list"] + justify: right; + /* Translators: Gets shown when autologin is enabled. */ + label: _("(Automatic Login)"); + wrap: true; + xalign: 0; + styles ["dim-label"] + } - Adw.ActionRow language_row { - name: "language"; - activatable: true; - /* Translators: Description of selected language. */ - title: _("Language"); - styles ["property"] + Image { + icon-name: "go-next-symbolic"; + } + } - Image { - icon-name: "go-next-symbolic"; - } - } + Adw.ActionRow format_row { + name: "format"; + activatable: true; + /* Translators: Description of selected format. */ + title: _("Formats"); + styles ["property"] - Adw.ActionRow keyboard_row { - name: "keyboard-overview"; - activatable: true; - /* Translators: Description of selected keyboard layout. */ - title: _("Keyboard Layout"); - styles ["property"] + Image { + icon-name: "go-next-symbolic"; + } + } - Image { - icon-name: "go-next-symbolic"; - } - } + Adw.ActionRow timezone_row { + name: "timezone"; + activatable: true; + /* Translators: Description of selected timezone. */ + title: _("Timezone"); + styles ["property"] - Adw.ActionRow user_row { - name: "user"; - activatable: true; - /* Translators: Description of defined user account name and autologin status. */ - title: _("User Account"); - styles ["property"] + Image { + icon-name: "go-next-symbolic"; + } + } - Label user_autologin { - halign: fill; - hexpand: true; - justify: right; - /* Translators: Gets shown when autologin is enabled. */ - label: _("(Automatic Login)"); - wrap: true; - xalign: 0; - styles ["dim-label"] - } + Adw.ActionRow software_row { + name: "software"; + activatable: true; - Image { - icon-name: "go-next-symbolic"; - } - } + [prefix] + Box { + orientation: vertical; + halign: start; + spacing: 3; - Adw.ActionRow format_row { - name: "format"; - activatable: true; - /* Translators: Description of selected format. */ - title: _("Formats"); - styles ["property"] - - Image { - icon-name: "go-next-symbolic"; - } - } - - Adw.ActionRow timezone_row { - name: "timezone"; - activatable: true; - /* Translators: Description of selected timezone. */ - title: _("Timezone"); - styles ["property"] - - Image { - icon-name: "go-next-symbolic"; - } - } - - Adw.ActionRow software_row { - name: "software"; - activatable: true; - - [prefix] - Box { - orientation: vertical; - halign: start; - spacing: 3; - - Label { - /* Translators: Description of selected additional software. */ - label: _("Additional Software"); - xalign: 0; - styles ["dim-label", "caption"] - } - - Stack software_stack { - vhomogeneous: false; - transition-type: crossfade; - - StackPage { - name: "used"; - child: ListBox software_list { - halign: start; - margin-bottom: 6; - selection-mode: none; - styles ["nested-list"] - }; - } - - StackPage { - name: "none"; - child: Label { - /* Translators: Shown when list of selected software is empty. */ - label: _("None"); - xalign: 0; - styles ["dim-label"] - }; - } - } - } - - Image { - icon-name: "go-next-symbolic"; - } - } - - Adw.ActionRow feature_row { - name: "feature"; - activatable: true; + Label { /* Translators: Description of selected additional software. */ + label: _("Additional Software"); + xalign: 0; + styles ["dim-label", "caption"] + } - [prefix] - Box { - orientation: vertical; - halign: start; - spacing: 3; + Stack software_stack { + vhomogeneous: false; + transition-type: crossfade; - Label { - /* Translators: Description of selected additional software. */ - label: _("Additional Features"); - xalign: 0; - styles ["dim-label", "caption"] - } - - - Stack feature_stack { - vhomogeneous: false; - transition-type: crossfade; - - StackPage { - name: "used"; - child: ListBox feature_list { - halign: start; - margin-bottom: 6; - selection-mode: none; - styles ["nested-list"] - }; - } - - StackPage { - name: "none"; - child: Label { - /* Translators: Shown when list of selected features is empty. */ - label: _("None"); - hexpand: true; - xalign: 0; - styles ["dim-label"] - }; - } - } + StackPage { + name: "used"; + child: ListBox software_list { + halign: start; + margin-bottom: 6; + selection-mode: none; + styles ["nested-list"] + }; } - Image { - icon-name: "go-next-symbolic"; + StackPage { + name: "none"; + child: Label { + /* Translators: Shown when list of selected software is empty. */ + label: _("None"); + xalign: 0; + styles ["dim-label"] + }; } } } - Button { - /* Translators: On button. */ - label: _("_Confirm"); - focusable: true; - receives-default: true; - halign: center; - use-underline: true; - clicked => $continue(); - styles ["suggested-action", "pill", "bottom-button"] + Image { + icon-name: "go-next-symbolic"; } - }; + } + + Adw.ActionRow feature_row { + name: "feature"; + activatable: true; + /* Translators: Description of selected additional software. */ + + [prefix] + Box { + orientation: vertical; + halign: start; + spacing: 3; + + Label { + /* Translators: Description of selected additional software. */ + label: _("Additional Features"); + xalign: 0; + styles ["dim-label", "caption"] + } + + + Stack feature_stack { + vhomogeneous: false; + transition-type: crossfade; + + StackPage { + name: "used"; + child: ListBox feature_list { + halign: start; + margin-bottom: 6; + selection-mode: none; + styles ["nested-list"] + }; + } + + StackPage { + name: "none"; + child: Label { + /* Translators: Shown when list of selected features is empty. */ + label: _("None"); + hexpand: true; + xalign: 0; + styles ["dim-label"] + }; + } + } + } + + Image { + icon-name: "go-next-symbolic"; + } + } + } + + Button { + /* Translators: On button. */ + label: _("_Confirm"); + focusable: true; + receives-default: true; + halign: center; + use-underline: true; + clicked => $continue(); + styles ["suggested-action", "pill", "bottom-button"] } }