Skip to content

Commit

Permalink
make the selection widget smaller (bsc#943636)
Browse files Browse the repository at this point in the history
to have more space for details when only few migrations
are available

Conflicts:
	test/migration_selection_dialog_test.rb
  • Loading branch information
lslezak committed Oct 12, 2015
1 parent a91cb78 commit 865641d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
6 changes: 6 additions & 0 deletions package/yast2-registration.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Aug 31 12:17:49 UTC 2015 - lslezak@suse.cz

- make the migration selection widget smaller to have more space
for details when only few migrations are available (bsc#943636)

-------------------------------------------------------------------
Fri Aug 28 10:31:56 UTC 2015 - lslezak@suse.cz

Expand Down
25 changes: 13 additions & 12 deletions src/lib/registration/ui/migration_selection_dialog.rb
Expand Up @@ -128,28 +128,29 @@ def dialog_content
VBox(
VSpacing(1),
migration_selection_widget,

MinHeight(8,
VWeight(25,
RichText(Id(:details), Opt(:vstretch), "")
)),
VWeight(15,
RichText(Id(:details), Opt(:vstretch), "")
),

VSpacing(Yast::UI.TextMode ? 0 : 1),
# TRANSLATORS: check button label
CheckBox(Id(:manual_repos), _("Manually Select Migration Repositories")),
VSpacing(1)
VSpacing(Yast::UI.TextMode ? 0 : 1)
)
end

# the main migration selection widget
# @return [Yast::Term] UI term
def migration_selection_widget
MinHeight(8,
VWeight(25,
# TRANSLATORS: selection box label
SelectionBox(Id(:migration_targets), Opt(:vstretch, :notify),
_("Possible Migration Targets"), migration_items)
))
# make the selection widget size depending on the number of available migrations
# (limit the size to have reasonable space for the details below)
weight = [5 + migrations.size, 10].min

VWeight(weight,
# TRANSLATORS: selection box label
SelectionBox(Id(:migration_targets), Opt(:vstretch, :notify),
_("Possible Migration Targets"), migration_items)
)
end

# list of items for the main widget
Expand Down

0 comments on commit 865641d

Please sign in to comment.