diff --git a/src/fenigma/firing_panel.py b/src/fenigma/firing_panel.py index a60c6dc..ebabfbd 100644 --- a/src/fenigma/firing_panel.py +++ b/src/fenigma/firing_panel.py @@ -91,6 +91,12 @@ class FiringPanel(Gtk.Box): self._list_box.set_margin_start(10) self._list_box.set_margin_end(10) scroller = Gtk.ScrolledWindow(child=self._list_box, vexpand=True) + # Horizontal scrolling is never wanted here (fixed-width sidebar), + # leaving it on AUTOMATIC (the default) lets a vertical scrollbar's + # own width shrink the content area enough to trigger a horizontal + # one too, which then perturbs card heights and can trip vertical + # scrolling that wasn't actually needed. Pin it off outright. + scroller.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) self.append(scroller) self.refresh() @@ -173,11 +179,13 @@ class FiringPanel(Gtk.Box): def sort_key(t: Target): dead_last = 1 if (self.show_dead == "sort_later" and not t.alive) else 0 - strike_first = 0 if t.type is TargetType.STRIKE else 1 - return (dead_last, strike_first) + return dead_last # Stable sort: ties keep board order, which is exactly what drag - # reordering (Board.reorder_target) manipulates. + # reordering (Board.reorder_target) manipulates. A new strike goes + # to the front once, at creation (see app.py's _add_strike_at), + # not forced back there on every refresh, that would fight any + # later manual reorder. targets.sort(key=sort_key) if not targets: