Merge branch 'main' into pipelines/run-20261113-1626-move-and-resize-floating-chats-on-every-0075

This commit is contained in:
2026-11-13 18:08:03 +00:00
2 changed files with 39 additions and 9 deletions
@@ -16,13 +16,19 @@ const double chatCenterStageWidth =
/// and a vertical title.
const double chatCenterStageStripMinimumWidth = 56;
/// How much wider than each pane beside it the stage is at least, so the
/// stage stays the biggest pane on a wide monitor.
const double chatCenterStageLeadFactor = 1.5;
/// The gap between the stage and each pane beside it.
const double chatCenterStageGap = chatPaneDividerExtent;
/// Where every pane sits while one chat is on center stage. Panes keep their
/// split-tree order left to right; the stage takes the full height and its
/// preferred width (capped by the workspace), and the others share the rest
/// as columns. A column narrower than a usable pane is shown as a strip.
/// preferred width (capped by the workspace), widened when the workspace is
/// so wide that the others would outgrow it: it is always at least
/// [chatCenterStageLeadFactor] times as wide as each other column, which share
/// the rest. A column narrower than a usable pane is shown as a strip.
class ChatCenterStageLayout {
ChatCenterStageLayout._(this.rects, this.strips, this.stageId);
@@ -45,8 +51,15 @@ class ChatCenterStageLayout {
}
final others = order.length - 1;
final available = size.width - chatCenterStageGap * others;
final leading =
available *
chatCenterStageLeadFactor /
(others + chatCenterStageLeadFactor);
final stage = math.min(
chatCenterStageWidth + (paneExtraWidths?[activeId] ?? 0),
math.max(
chatCenterStageWidth + (paneExtraWidths?[activeId] ?? 0),
leading,
),
available - others * chatCenterStageStripMinimumWidth,
);
if (stage < chatPaneMinimumWidth) return null;