feat: add win.getBackgroundColor() for macOS (#21448)

thanks @vbennich - great work on this 🌟
This commit is contained in:
Victor Bennich 2019-12-13 17:08:30 +01:00 committed by Shelley Vohr
parent c1210f8ad3
commit cf833a7650
10 changed files with 46 additions and 1 deletions

View file

@ -620,6 +620,10 @@ void TopLevelWindow::SetBackgroundColor(const std::string& color_name) {
window_->SetBackgroundColor(color);
}
std::string TopLevelWindow::GetBackgroundColor() {
return ToRGBHex(window_->GetBackgroundColor());
}
void TopLevelWindow::SetHasShadow(bool has_shadow) {
window_->SetHasShadow(has_shadow);
}
@ -1145,6 +1149,7 @@ void TopLevelWindow::BuildPrototype(v8::Isolate* isolate,
.SetMethod("setKiosk", &TopLevelWindow::SetKiosk)
.SetMethod("isKiosk", &TopLevelWindow::IsKiosk)
.SetMethod("setBackgroundColor", &TopLevelWindow::SetBackgroundColor)
.SetMethod("getBackgroundColor", &TopLevelWindow::GetBackgroundColor)
.SetMethod("setHasShadow", &TopLevelWindow::SetHasShadow)
.SetMethod("hasShadow", &TopLevelWindow::HasShadow)
.SetMethod("setOpacity", &TopLevelWindow::SetOpacity)