Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dimm WCO when dialog opens #236080

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Dimm WCO when dialog opens #236080

wants to merge 2 commits into from

Conversation

benibenj
Copy link
Contributor

@benibenj benibenj commented Dec 13, 2024

Implement dimming of window controls when a dialog is open and updates the colors of the window controls based on the windows active state.

fixes #159671

@benibenj benibenj self-assigned this Dec 13, 2024
@benibenj benibenj requested a review from bpasero December 13, 2024 16:51
@benibenj benibenj enabled auto-merge (squash) December 13, 2024 16:51
@vs-code-engineering vs-code-engineering bot added this to the January 2025 milestone Dec 13, 2024
Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is another case of new Dialog here:

@@ -33,11 +36,14 @@ export class DialogHandlerContribution extends Disposable implements IWorkbenchC
@IKeybindingService keybindingService: IKeybindingService,
@IInstantiationService instantiationService: IInstantiationService,
@IProductService productService: IProductService,
@IClipboardService clipboardService: IClipboardService
@IClipboardService clipboardService: IClipboardService,
@INativeHostService nativeHostService: INativeHostService,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Native host service is Electron only, not web.

const overlayColor = new Color(new RGBA(0, 0, 0, 0.3));
const backgroundColor = dimmed ? overlayColor.makeOpaque(titleBarBackgroundColor) : titleBarBackgroundColor;
const foregroundColor = dimmed ? overlayColor.makeOpaque(titleBarForegroundColor) : titleBarForegroundColor;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this taken from somewhere were we already dim buttons or is this new? We still have custom window buttons around here:

if (isLinux && !hasNativeTitlebar(this.configurationService) && !isWCOEnabled() && this.windowControlsContainer) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Window control overlay does not dim when modal custom dialog shows
2 participants