Skip to content

Commit

Permalink
Improve layout of user "Details" tab
Browse files Browse the repository at this point in the history
Adjusted some margins and moved the "Default group" option to the right
side, above "Additional Groups".

Co-Authored-By: Ladislav Slezák <lslezak@suse.cz>
  • Loading branch information
dgdavid and lslezak committed Feb 10, 2019
1 parent c88d233 commit 451c977
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions src/include/users/dialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -719,28 +719,12 @@ def EditUserDialog(what)
end

browse = VBox(
Label(""),
# button label
PushButton(Id(:browse), Opt(:key_F6), _("B&rowse...")),
action != "edited" ? Empty() : Label("")
VSpacing(1),
PushButton(Id(:browse), Opt(:key_F6), _("B&rowse..."))
)

home_w = VBox(
# textentry label
InputField(Id(:home), Opt(:hstretch), _("&Home Directory"), home),
action != "edited" ?
Empty() :
HBox(
HSpacing(),
Left(
CheckBox(
Id(:move_home),
# check box label
_("&Move to New Location"),
create_home
)
)
)
)
new_user_term = action != "added" ?
VBox() :
Expand Down Expand Up @@ -770,7 +754,6 @@ def EditUserDialog(what)
)
) :
VSpacing(0),
VSpacing(0.5),
HBox(
text_mode ? Empty() : HSpacing(1),
HWeight(
Expand All @@ -789,23 +772,27 @@ def EditUserDialog(what)
Top(
VBox(
HBox(home_w, browse),
move_to_new_location_checkbox(action, create_home),
new_user_term,
HBox(
HSpacing(),
Left(CheckBox(Id(:btrfs_subvolume), _("Btrfs subvolume"), btrfs_subvolume))
),
)
),
VSpacing(1),
additional_data,
text_mode ? Empty() : HSpacing(1),
Top(edit_shell),
Top(edit_defaultgroup),
VStretch()
)
),
text_mode ? Empty() : HSpacing(2),
HSpacing(2),
HWeight(
2,
VBox(
VSpacing(0.5),
edit_defaultgroup,
VSpacing(0.5),
MultiSelectionBox(
Id(:grouplist),
Expand All @@ -825,7 +812,6 @@ def EditUserDialog(what)
),
text_mode ? Empty() : HSpacing(1)
),
VSpacing(0.5)
),
HSpacing(1)
)
Expand Down Expand Up @@ -1888,6 +1874,23 @@ def EditUserDialog(what)
ret
end

def move_to_new_location_checkbox(action, checked)
return Empty() if action != "edited"

HBox(
HSpacing(),
Left(
CheckBox(Id(:move_home), _("&Move to New Location"), checked)
)
)
end

def btrfs_label
# TRANSLATORS: label for the checkbox that allows to create the user home directory as a
# Btrfs subvolume
_("Create a Separate Btrfs Subvolume for the Home Directory")
end

# Returns clean path
#
# Also useful to remove the trailing backslash
Expand Down

0 comments on commit 451c977

Please sign in to comment.