disk: add heading above partition listing
This commit is contained in:
@@ -78,14 +78,33 @@ template DiskPage : Box {
|
||||
|
||||
Separator {}
|
||||
|
||||
ListBox partition_list {
|
||||
visible: true;
|
||||
valign: start;
|
||||
styles ["boxed-list", "angular-first"]
|
||||
Box partitions_section {
|
||||
orientation: vertical;
|
||||
|
||||
Label {
|
||||
/*Translators: Heading of list of partitions*/
|
||||
label: _("Partitions");
|
||||
margin-start: 12;
|
||||
margin-end: 12;
|
||||
margin-top: 12;
|
||||
margin-bottom: 12;
|
||||
justify: center;
|
||||
wrap: true;
|
||||
styles ["heading"]
|
||||
}
|
||||
|
||||
Separator {}
|
||||
|
||||
ListBox partition_list {
|
||||
selection-mode: none;
|
||||
visible: true;
|
||||
valign: start;
|
||||
styles ["boxed-list", "angular-first"]
|
||||
}
|
||||
}
|
||||
|
||||
Box missing_things_info {
|
||||
visible: bind partition_list.visible inverted bidirectional;
|
||||
visible: bind partitions_section.visible inverted bidirectional;
|
||||
margin-start: 18;
|
||||
margin-end: 18;
|
||||
margin-top: 6;
|
||||
|
||||
@@ -77,6 +77,7 @@ class DiskPage(Gtk.Box, Page):
|
||||
disk_uefi_okay = not is_booted_with_uefi() or disk_info.efi_partition
|
||||
if disk_uefi_okay and len(disk_info.partitions) > 0:
|
||||
partitions = disk_info.partitions
|
||||
self.missing_things_info.set_visible(False)
|
||||
else:
|
||||
self.missing_things_info.set_visible(True)
|
||||
reset_model(self.partition_list_model, partitions)
|
||||
|
||||
Reference in New Issue
Block a user