Skip to content

Commit

Permalink
Layout adjustments in the "Boot Code Options" tab
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Feb 8, 2019
1 parent e80fc3e commit 53a711d
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/lib/bootloader/grub2_widgets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,6 @@ def contents
textdomain "bootloader"

VBox(
VSpacing(1),
Frame(
_("Boot Loader Location"),
HBox(
Expand Down Expand Up @@ -870,7 +869,12 @@ def label

def contents
VBox(
Left(LoaderTypeWidget.new),
VSpacing(1),
HBox(
HSpacing(1),
Left(LoaderTypeWidget.new)
),
VSpacing(1),
*widgets,
VStretch()
)
Expand All @@ -879,6 +883,8 @@ def contents
private

def widgets
hspacing = Yast::UI.TextMode ? 1 : 1.5

w = []
w << LoaderLocationWidget.new if loader_location_widget?

Expand All @@ -889,12 +895,15 @@ def widgets

w << SecureBootWidget.new if secure_boot_widget?
w << TrustedBootWidget.new if trusted_boot_widget?
w << PMBRWidget.new if pmbr_widget?
w << DeviceMapWidget.new if device_map_button?

w.map do |widget|
MarginBox(1, 0.5, Left(widget))
w.map! do |widget|
MarginBox(hspacing, 0, Left(widget))
end

w << VSpacing(1)
w << MarginBox(1, 0, Left(PMBRWidget.new)) if pmbr_widget?
w << MarginBox(1, 0, Left(DeviceMapWidget.new)) if device_map_button?
w
end

def loader_location_widget?
Expand Down

0 comments on commit 53a711d

Please sign in to comment.