Skip to content

Commit

Permalink
new-bottle-dialog: Rearrange elements
Browse files Browse the repository at this point in the history
The headings were removed, as there is no reason to keep cluttering
the UI with unnecessary text. The Runner and bottle directory
options are now available in every environment.

Closes #3036
  • Loading branch information
TheEvilSkeleton committed Jan 3, 2025
1 parent 0fadd77 commit d694b2f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 27 deletions.
43 changes: 20 additions & 23 deletions bottles/frontend/ui/new-bottle-dialog.blp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ template $BottlesNewBottleDialog: Adw.Dialog {
}

Adw.PreferencesGroup {
title: _("Environment");

ListBox environment_list_box {
selection-mode: none;

Expand Down Expand Up @@ -99,8 +97,13 @@ template $BottlesNewBottleDialog: Adw.Dialog {
}

Adw.PreferencesGroup {
title: _("Custom");
sensitive: bind custom.active;
Adw.ComboRow combo_arch {
title: _("Architecture");
subtitle: _("32-bit should only be used if strictly necessary.");
visible: bind custom.active;

model: StringList str_list_arch {};
}

Adw.ComboRow combo_runner {
title: _("Runner");
Expand All @@ -109,19 +112,12 @@ template $BottlesNewBottleDialog: Adw.Dialog {
model: StringList str_list_runner {};
}

Adw.ComboRow combo_arch {
title: _("Architecture");
subtitle: _("32-bit should only be used if strictly necessary.");

model: StringList str_list_arch {};
}

Adw.ActionRow {
title: _("Configuration");
subtitle: _("Import a custom configuration.");
activatable-widget: btn_choose_env;
title: _("Bottle Directory");
subtitle: _("Directory that will contain the data of this bottle.");
activatable-widget: btn_choose_path;

Button btn_choose_env_reset {
Button btn_choose_path_reset {
tooltip-text: _("Reset to Default");
valign: center;
visible: false;
Expand All @@ -132,7 +128,7 @@ template $BottlesNewBottleDialog: Adw.Dialog {
]
}

Button btn_choose_env {
Button btn_choose_path {
valign: center;

child: Box {
Expand All @@ -142,17 +138,18 @@ template $BottlesNewBottleDialog: Adw.Dialog {
icon-name: "document-open-symbolic";
}

Label label_choose_env {}
Label label_choose_path {}
};
}
}

Adw.ActionRow {
title: _("Bottle Directory");
subtitle: _("Directory that will contain the data of this bottle.");
activatable-widget: btn_choose_path;
title: _("Configuration");
subtitle: _("Import a custom configuration.");
activatable-widget: btn_choose_env;
visible: bind custom.active;

Button btn_choose_path_reset {
Button btn_choose_env_reset {
tooltip-text: _("Reset to Default");
valign: center;
visible: false;
Expand All @@ -163,7 +160,7 @@ template $BottlesNewBottleDialog: Adw.Dialog {
]
}

Button btn_choose_path {
Button btn_choose_env {
valign: center;

child: Box {
Expand All @@ -173,7 +170,7 @@ template $BottlesNewBottleDialog: Adw.Dialog {
icon-name: "document-open-symbolic";
}

Label label_choose_path {}
Label label_choose_env {}
};
}
}
Expand Down
5 changes: 1 addition & 4 deletions bottles/frontend/views/new_bottle_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,7 @@ def create_bottle(self, *_args: Any) -> None:
self.set_can_close(False)
self.stack_create.set_visible_child_name("page_creating")

if self.selected_environment == "active":
self.runner = self.manager.runners_available[
self.combo_runner.get_selected()
]
self.runner = self.manager.runners_available[self.combo_runner.get_selected()]

RunAsync(
task_func=self.manager.create_bottle,
Expand Down

0 comments on commit d694b2f

Please sign in to comment.