diff --git a/nion/swift/ActivityPanel.py b/nion/swift/ActivityPanel.py index 34cec6673..bdf58fd8a 100644 --- a/nion/swift/ActivityPanel.py +++ b/nion/swift/ActivityPanel.py @@ -94,21 +94,23 @@ def activity_changed(key: str, value: Activity.Activity, index: int) -> None: self.__activity_removed_listener = self.activities.item_removed_event.listen(activity_changed) u = Declarative.DeclarativeUI() - self.ui_view = u.create_column( - u.create_stack( - u.create_column( - u.create_label(text=_("No activities.")), - u.create_stretch(), + self.ui_view = u.create_scroll_area( + u.create_column( + u.create_stack( + u.create_column( + u.create_label(text=_("No activities.")), + u.create_stretch(), + ), + u.create_column( + u.create_column(items="activities.items", item_component_id="activity", spacing=6), + u.create_stretch(), + ), + current_index="@binding(stack_index.value)" ), - u.create_column( - u.create_column(items="activities.items", item_component_id="activity", spacing=6), - u.create_stretch(), - ), - current_index="@binding(stack_index.value)" - ), - u.create_stretch(), - spacing=8, - margin=8 + u.create_stretch(), + spacing=8, + margin=8 + ) ) def close(self) -> None: @@ -149,7 +151,7 @@ async def later() -> None: Activity.append_activity(drink) await asyncio.sleep(3.0) - eat = XActivity("Eat") + eat = Activity.Activity("eat", "Eat") Activity.append_activity(eat) await asyncio.sleep(3.0) diff --git a/nion/swift/resources/changes.json b/nion/swift/resources/changes.json index 2e290e0a3..efcbfb9ba 100644 --- a/nion/swift/resources/changes.json +++ b/nion/swift/resources/changes.json @@ -2,6 +2,10 @@ { "version": "Unreleased", "notes": [ + { + "issues": ["https://github.com/nion-software/nionswift/issues/992"], + "summary": "Add scroll bar to activity panel to prevent it growing beyond its available height." + }, { "issues": ["https://github.com/nion-software/nionswift/issues/5"], "summary": "Hovering over items in grid browser shows info about the item."