Skip to content

Commit 5f2dc37

Browse files
committed
DiskBar: Increase minimum partition percentage
1 parent c31a96b commit 5f2dc37

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

src/Views/PartitioningView.vala

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,52 @@ public class Installer.PartitioningView : AbstractInstallerView {
589589
partitions = {partitions_13, partitions_14}
590590
};
591591

592+
var partitions_15 = InstallerDaemon.Partition () {
593+
device_path = "/dev/nvme0n2p1",
594+
filesystem = InstallerDaemon.FileSystem.FAT32,
595+
start_sector = 4096,
596+
end_sector = 542966,
597+
sectors_used = InstallerDaemon.PartitionUsage () {
598+
tag = 1,
599+
value = 35376
600+
},
601+
current_lvm_volume_group = ""
602+
};
603+
604+
var partitions_16 = InstallerDaemon.Partition () {
605+
device_path = "/dev/nvme0n2p2",
606+
filesystem = InstallerDaemon.FileSystem.EXT4,
607+
start_sector = 544768,
608+
end_sector = 537415679,
609+
sectors_used = InstallerDaemon.PartitionUsage () {
610+
tag = 1,
611+
value = 10641584
612+
},
613+
current_lvm_volume_group = ""
614+
};
615+
616+
var partitions_17 = InstallerDaemon.Partition () {
617+
device_path = "/dev/nvme0n2p3",
618+
filesystem = InstallerDaemon.FileSystem.EXT4,
619+
start_sector = 537415680,
620+
end_sector = 1611156503,
621+
sectors_used = InstallerDaemon.PartitionUsage () {
622+
tag = 1,
623+
value = 19087560
624+
},
625+
current_lvm_volume_group = ""
626+
};
627+
628+
physical_disks += InstallerDaemon.Disk () {
629+
name = "WDC PC SN5000S SDEPNSJ-1T00-1032",
630+
device_path = "/dev/nvme0n2",
631+
sectors = 2000409264,
632+
sector_size = 512,
633+
rotational = false,
634+
removable = false,
635+
partitions = {partitions_15, partitions_16, partitions_17}
636+
};
637+
592638
return InstallerDaemon.DiskInfo () {
593639
physical_disks = physical_disks,
594640
logical_disks = logical_disks

src/Widgets/DiskBar.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public class Installer.DiskBar: Gtk.Box {
154154
// Also make sure percentage is never 0, otherwise we can assertion error:
155155
// gtk_constraint_expression_new_subject: assertion failed: (!G_APPROX_VALUE (term->coefficient, 0.0, 0.001))
156156
// Also we assume partitions.size is less than 100
157-
percentage = ((int) (percentage * 100) / 100.0).clamp (0.01, 1.0 - partitions.size / 100.0);
157+
percentage = ((int) (percentage * 100) / 100.0).clamp (0.1, 1.0 - partitions.size / 100.0);
158158

159159
widget.set_parent (this);
160160

0 commit comments

Comments
 (0)