Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions crates/cordiale-ui/ui/appwindow.slint
Original file line number Diff line number Diff line change
Expand Up @@ -1250,17 +1250,22 @@ export component AppWindow inherits Window {

// User-resizable via the drag handles between the three "connected"
// screen columns (see `ResizeHandle`) — session-local, not persisted.
property <length> sidebar-width: 180px;
property <length> sidebar-width: sidebar-icons-min-width;
property <length> members-width: 160px;
// Texts measured by the invisible probes below to derive each side
// column's minimum width: the widest sidebar row label, and a run of
// average-width characters as long as the average member label.
in property <string> sidebar-widest-label: "";
in property <string> members-average-nick: "";
// The sidebar never gets narrower than its widest row (plus the row
// indent, the part button and the box padding); the member column never
// narrower than the average member label or its Actions button.
property <length> sidebar-min-width: max(120px, sidebar-label-probe.preferred-width + 90px);
// indent, the part button and the box padding) nor than the top row of
// five 32px icon buttons (4px spacing, 12px box padding per side); the
// member column never narrower than the average member label or its
// Actions button.
property <length> sidebar-icons-min-width: 5 * 32px + 4 * 4px + 2 * 12px;
property <length> sidebar-min-width: max(
max(120px, sidebar-icons-min-width),
sidebar-label-probe.preferred-width + 90px);
property <length> members-min-width: max(
actions-probe.preferred-width + 16px,
members-nick-probe.preferred-width + 40px);
Expand Down
Loading