Skip to content
Open
Show file tree
Hide file tree
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
23 changes: 23 additions & 0 deletions dsh-plugin-desktop/src/client/extended-styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,31 @@ body[data-dsh-desktop-mode="extended"]:not([data-dsh-desktop-material="off"]) {
align-items: center;
gap: 9px;
min-width: 0;
max-width: 100%;
transform: translateX(-50%);
pointer-events: none;
overflow: hidden;
}
/* Cap the centered identity to the visible title-bar band so the version
and mode pills can never slide under the native caption controls.
The frame is viewport-centered (left: 50%), so the cap reserves the
full native-controls strip on both sides: 2 * (safe width + 8). */
.dshDesktopFrameTitlebar[data-platform="darwin"] .dshDesktopFrameIdentity {
max-width: calc(100% - ${(MACOS_TRAFFIC_LIGHT_SAFE_WIDTH + 8) * 2}px);
}
.dshDesktopFrameTitlebar[data-platform="win32"] .dshDesktopFrameIdentity {
max-width: calc(100% - ${(WINDOWS_CAPTION_CONTROLS_WIDTH + 8) * 2}px);
}
.dshDesktopFrameIdentity > * { min-width: 0; }
.dshDesktopFrameProduct,
.dshDesktopFrameVersion,
.dshDesktopFrameMode {
overflow: hidden;
text-overflow: ellipsis;
}
/* Below this width the decorative product label yields to the interactive pills. */
@media (max-width: 480px) {
.dshDesktopFrameProduct { display: none; }
}
.dshDesktopFrameProduct { font-size: 13px; font-weight: 600; white-space: nowrap; }
.dshDesktopFrameVersion {
Expand Down
6 changes: 6 additions & 0 deletions dsh-plugin-desktop/tests/client-environment.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,12 @@ describe('independent Desktop frame', () => {
expect(css).toMatch(/\.dshDesktopFrameTitlebar \{[^}]*-webkit-app-region: drag;/)
expect(css).toMatch(/\.dshDesktopFrameTitlebar \{[^}]*z-index: 2147483647;/)
expect(css).toMatch(/\.dshDesktopFrameIdentity \{[^}]*left: 50%;[^}]*transform: translateX\(-50%\);/)
expect(css).toMatch(/\.dshDesktopFrameIdentity \{[^}]*max-width: 100%;[^}]*overflow: hidden;/)
expect(css).toMatch(new RegExp(`\\[data-platform="darwin"\\] \\.dshDesktopFrameIdentity \\{\\s*max-width: calc\\(100% - ${(MACOS_TRAFFIC_LIGHT_SAFE_WIDTH + 8) * 2}px\\);`))
expect(css).toMatch(new RegExp(`\\[data-platform="win32"\\] \\.dshDesktopFrameIdentity \\{\\s*max-width: calc\\(100% - ${(WINDOWS_CAPTION_CONTROLS_WIDTH + 8) * 2}px\\);`))
expect(css).toContain('.dshDesktopFrameIdentity > * { min-width: 0; }')
expect(css).toMatch(/\.dshDesktopFrameProduct,[\s\S]*?\.dshDesktopFrameMode \{\s*overflow: hidden;\s*text-overflow: ellipsis;/)
expect(css).toContain('@media (max-width: 480px)')
expect(css).toMatch(/\.dshDesktopFrameActions \{[^}]*-webkit-app-region: no-drag;/)
expect(css).toContain('[data-platform="darwin"] .dshDesktopFrameActions { margin-left: auto; }')
expect(css).toContain('[data-platform="win32"] .dshDesktopFrameActions { margin-right: auto; }')
Expand Down