Skip to content

Fix background color for window controls overlay in titlebar#314753

Draft
mrleemurray wants to merge 4 commits intomainfrom
mrleemurray/mild-pink-roundworm
Draft

Fix background color for window controls overlay in titlebar#314753
mrleemurray wants to merge 4 commits intomainfrom
mrleemurray/mild-pink-roundworm

Conversation

@mrleemurray
Copy link
Copy Markdown
Contributor

@mrleemurray mrleemurray commented May 6, 2026

Resolve the background color issue for the window controls overlay in the titlebar by directly using the theme's agentsBackground. This change ensures the overlay displays the correct color when the theme changes, addressing the transparency issue.

Fixes #312914

Copilot AI review requested due to automatic review settings May 6, 2026 15:22
@mrleemurray mrleemurray self-assigned this May 6, 2026
@mrleemurray mrleemurray requested review from deepak1556 May 6, 2026 15:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the Electron Window Controls Overlay (WCO) background color in the Agents Sessions titlebar by resolving an explicit, opaque color from the active theme instead of relying on element.style.backgroundColor (which is intentionally empty due to the transparent/gradient titlebar styling in sessions).

Changes:

  • Resolve the WCO background color from the agentsBackground theme token (instead of element.style.backgroundColor).
  • Ensure the resolved color is opaque via makeOpaque(WORKBENCH_BACKGROUND(theme)), matching established workbench behavior for WCO/titlebar backgrounds.
  • Update WCO style caching/update logic to compare against the resolved bgColor/fgColor values.

@benibenj
Copy link
Copy Markdown
Contributor

benibenj commented May 7, 2026

This doesn't fix it.
image

The issue is the gradient which starts at the top left and goes to the bottom right. You need to correctly compute the color which will apply to the top right. This works by coincidence on macOS because the WCO is in the top left, but does not wok in windows and linux where it is in the top right.

@mrleemurray
Copy link
Copy Markdown
Contributor Author

@hawkticehurst will be reducing the gradient size to avoid color clash

@mrleemurray
Copy link
Copy Markdown
Contributor Author

mrleemurray commented May 7, 2026

Pulled in Hawk's new gradient - please retest @benibenj

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.

Agents window Windows Control Overlay does not change with theme

3 participants