Skip to content

Commit

Permalink
bottle-row: Port to AdwWrapBox
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEvilSkeleton committed Jan 15, 2025
1 parent b2293af commit eb81c03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
16 changes: 6 additions & 10 deletions bottles/frontend/ui/bottle-row.blp
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@ template $BottlesBottleRow: Adw.ActionRow {
activatable: true;
use-markup: false;

Box {
spacing: 6;

Label label_env {
valign: center;
Adw.WrapBox wrap_box {
valign: center;

styles [
"tag",
"caption",
]
}
styles [
"tag",
"caption",
]
}

Button button_run {
Expand Down
6 changes: 3 additions & 3 deletions bottles/frontend/views/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class BottlesBottleRow(Adw.ActionRow):

# region Widgets
button_run = Gtk.Template.Child()
label_env = Gtk.Template.Child()
wrap_box = Gtk.Template.Child()

# endregion

Expand Down Expand Up @@ -74,8 +74,8 @@ def __init__(self, window, config: BottleConfig, **kwargs):
self.set_title(self.config.Name)
if self.window.settings.get_boolean("update-date"):
self.set_subtitle(update_date)
self.label_env.set_text(_(self.config.Environment))
self.label_env.add_css_class("tag-%s" % self.config.Environment.lower())

self.wrap_box.append(Gtk.Label.new(self.config.Environment))

# Set tooltip text
self.button_run.set_tooltip_text(_(f"Run executable in “{self.config.Name}”"))
Expand Down

0 comments on commit eb81c03

Please sign in to comment.