Merge pull request #5153 from electron/fix-frameless-background

Fix wrong default transparent background for frameless window
This commit is contained in:
Cheng Zhao 2016-04-14 20:05:35 +09:00
commit 7501a02b34

View file

@ -162,8 +162,8 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
std::string color; std::string color;
if (options.Get(options::kBackgroundColor, &color)) { if (options.Get(options::kBackgroundColor, &color)) {
SetBackgroundColor(color); SetBackgroundColor(color);
} else if (has_frame()) { } else if (!transparent()) {
// For window with frame, use white as default background. // For normal window, use white as default background.
SetBackgroundColor("#FFFF"); SetBackgroundColor("#FFFF");
} }
std::string title("Electron"); std::string title("Electron");