kVibrancyType should be read in InitFromOptions

This commit is contained in:
Cheng Zhao 2018-04-10 16:54:07 +09:00
parent cfd8ea8eb0
commit 5a95aaaa54
2 changed files with 6 additions and 5 deletions

View file

@ -131,6 +131,12 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
if (options.Get(options::kKiosk, &kiosk) && kiosk) {
SetKiosk(kiosk);
}
#if defined(OS_MACOSX)
std::string type;
if (options.Get(options::kVibrancyType, &type)) {
SetVibrancy(type);
}
#endif
std::string color;
if (options.Get(options::kBackgroundColor, &color)) {
SetBackgroundColor(ParseHexColor(color));

View file

@ -970,11 +970,6 @@ NativeWindowMac::NativeWindowMac(const mate::Dictionary& options,
return event;
}];
std::string type;
if (options.Get(options::kVibrancyType, &type)) {
SetVibrancy(type);
}
// Set maximizable state last to ensure zoom button does not get reset
// by calls to other APIs.
SetMaximizable(maximizable);