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

Allow app to disable transparent background in windowless mode #1019

Merged
merged 4 commits into from
May 12, 2015
Merged

Allow app to disable transparent background in windowless mode #1019

merged 4 commits into from
May 12, 2015

Conversation

jamespearce2006
Copy link
Contributor

Currently, ManagedCefBrowserAdapter always sets transparent to TRUE when setting windowless mode.

Transparency isn't always desired, and attempting to place the browser control in a painted outer control can have ugly side-effects when resizing the app, if its colour is different from the containing window.

This PR lets the ChromiumWebBrowser specify whether transparency should be set.

@rassilon
Copy link
Contributor

rassilon commented May 8, 2015

Does it make sense to make the same change to the Offscreen control as well?

@@ -72,10 +72,15 @@ namespace CefSharp

void CreateOffscreenBrowser(IntPtr windowHandle, BrowserSettings^ browserSettings, String^ address)
Copy link
Member

Choose a reason for hiding this comment

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

No need for an overload as this is an internal method.

@amaitland
Copy link
Member

Does it make sense to make the same change to the Offscreen control as well?

Yes

This topic was discussed a while ago. I think the general idea was to add the property to the BrowserSettings. Thoughts?

@jamespearce2006
Copy link
Contributor Author

I've made the suggested change - to use BrowserSettings instead. It seems a lot cleaner.

@amaitland amaitland added this to the 39.0.2 milestone May 11, 2015
@amaitland amaitland merged commit 118cae0 into cefsharp:master May 12, 2015
@amaitland
Copy link
Member

I've made the suggested change - to use BrowserSettings instead. It seems a lot cleaner

Cool 😄

I made a few changes, changed to using GetValueOrDefault to simplify the code. Uppercased the S in OffScreen to match other project references. Changed to using an auto property in BrowserSettings

3b27034 6805c18

Thanks for the contribution 👍

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.

3 participants