Skip to content

Commit

Permalink
Merge pull request #551 from yast/feature/layout-adjustments
Browse files Browse the repository at this point in the history
Layout adjustments
  • Loading branch information
dgdavid committed Feb 8, 2019
2 parents e80fc3e + 55787da commit f6260df
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
6 changes: 6 additions & 0 deletions package/yast2-bootloader.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 8 08:47:35 UTC 2019 - dgonzalez@suse.com

- Improve the layout of "Boot Code Options" tab (bsc#1120793)
- 4.1.16

-------------------------------------------------------------------
Wed Feb 6 14:02:48 UTC 2019 - Stefan Hundhammer <shundhammer@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-bootloader.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-bootloader
Version: 4.1.15
Version: 4.1.16
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
31 changes: 26 additions & 5 deletions src/lib/bootloader/grub2_widgets.rb
Expand Up @@ -703,7 +703,6 @@ def contents
textdomain "bootloader"

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

def contents
VBox(
Left(LoaderTypeWidget.new),
VSpacing(1),
HBox(
HSpacing(1),
Left(LoaderTypeWidget.new)
),
VSpacing(1),
*widgets,
VSpacing(1),
pmbr_widget,
device_map_button,
VStretch()
)
end
Expand All @@ -889,14 +896,28 @@ 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))
MarginBox(horizontal_margin, 0, Left(widget))
end
end

def pmbr_widget
return Empty() unless pmbr_widget?

MarginBox(1, 0, Left(PMBRWidget.new))
end

def device_map_button
return Empty() unless device_map_button?

MarginBox(1, 0, Left(DeviceMapWidget.new))
end

def horizontal_margin
@horizontal_margin ||= Yast::UI.TextMode ? 1 : 1.5
end

def loader_location_widget?
(Yast::Arch.x86_64 || Yast::Arch.i386 || Yast::Arch.ppc) && grub2.name == "grub2"
end
Expand Down

0 comments on commit f6260df

Please sign in to comment.