Files
openidea/src/workbench/StatusBar.module.css
T
LU XIANGRUIandwildcatDownstairs 7780c3fe64 fix(workbench): move status items that don't fit into an overflow popup (#4087)
At narrow window widths the right status items were clipped off the bar (the bar is overflow: hidden and right items don't shrink), so the Python interpreter picker, caret, encoding and others became unreachable. Right items that don't fit now move into a trailing "..." popup, lowest priority first, and come back when the window widens. Each item renders into a stable host element that moves between the bar and the popup, so widgets keep their state and their own popups.

Closes #4071

Co-authored-by: wildcatDownstairs <26499420+wildcatDownstairs@users.noreply.github.com>
2026-11-18 10:10:58 +08:00

153 lines
2.8 KiB
CSS

/* Islands: the status bar sits on the frame background, no divider. */
.bar {
height: calc(var(--h-statusbar) + 4px);
flex: none;
display: flex;
align-items: center;
gap: var(--space-1);
padding: 0 10px 0 12px;
font-family: var(--font-ui);
font-size: var(--fs-ui);
color: var(--fg-muted);
white-space: nowrap;
overflow: hidden;
position: relative;
}
/* Widgets read as plain UI text like IDEA's, whatever their own font. */
.item {
font-family: var(--font-ui);
}
.item button {
font-family: inherit;
font-size: inherit;
color: inherit;
}
.item {
flex: none;
display: flex;
align-items: center;
min-width: 0;
padding: 0 4px;
}
/* Left items (breadcrumbs…) give way first on narrow windows; right items move into the overflow popup. */
.shrink {
flex: 0 1 auto;
overflow: hidden;
}
.shrink > * {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.item:empty {
display: none;
}
.spacer {
flex: 1;
min-width: 8px;
}
.slot {
display: contents;
}
/* An overflowed item while its popup is closed: measurable, out of the flow, at the bar's end. */
.overflowed {
position: absolute;
inset: 0 10px 0 auto;
display: flex;
align-items: center;
visibility: hidden;
}
.more {
flex: none;
}
.moreList {
display: flex;
flex-direction: column;
padding: var(--space-1) 0;
font-family: var(--font-ui);
font-size: var(--fs-ui);
color: var(--fg-muted);
white-space: nowrap;
}
.moreRow {
display: flex;
align-items: center;
gap: var(--space-3);
padding: 0 var(--space-2) 0 var(--space-3);
min-height: var(--h-statusbar);
}
.moreLabel {
flex: 1;
color: var(--fg-subtle);
}
.task {
max-width: 320px;
}
.taskTitle {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
font-family: var(--font-ui);
}
.taskBar {
width: 96px;
flex: none;
}
.taskMore {
color: var(--fg-faint);
}
.taskList {
width: 320px;
padding: 6px 0;
font-family: var(--font-ui);
}
.taskListHeader {
padding: 2px 12px 6px;
color: var(--fg-faint);
font-size: var(--fs-small);
}
.taskRow {
display: flex;
flex-direction: column;
gap: 5px;
padding: 6px 12px;
}
.taskRowHead {
display: flex;
align-items: center;
gap: var(--space-2);
}
.taskRowTitle {
flex: 1;
min-width: 0;
color: var(--fg-emphasis);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.taskCancelOff {
display: inline-flex;
}
.taskCancelOff > button {
pointer-events: none;
}
.taskPct {
font-family: var(--font-mono);
font-size: var(--fs-small);
color: var(--fg-subtle);
}
.taskMessage {
color: var(--fg-subtle);
font-size: var(--fs-small);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.info {
color: var(--fg-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}