Skip to content

CefSettings.background_color has no effect #362

Open
@magreenblatt

Description

@magreenblatt

Original report by Anton Tarasov (Bitbucket: Anton Tarasov).


When I set a background color like (red):
settings.background_color = settings.new ColorType(255, 255, 0, 0);

And then create windowed opaque browser:
client.createBrowser("about:blank", false, false);

It always appears with white background.
On macOS it takes some time before a web page loads, so the white background can contrast with dark UI…

The reason is that the color is overridden in CefBrowser_N.create:
if (transparent == JNI_FALSE) {
// Specify an opaque background color (white) to disable transparency.
settings.background_color = CefColorSetARGB(255, 255, 255, 255);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions