feat: add optional animation parameter to BrowserWindow.setVibrancy (#35987)
adds optional animation parameter to BrowserWindow.setVibrancy
This commit is contained in:
parent
a6390b539c
commit
7a79d4c96e
7 changed files with 66 additions and 19 deletions
|
@ -810,9 +810,18 @@ void BaseWindow::SetAutoHideCursor(bool auto_hide) {
|
|||
window_->SetAutoHideCursor(auto_hide);
|
||||
}
|
||||
|
||||
void BaseWindow::SetVibrancy(v8::Isolate* isolate, v8::Local<v8::Value> value) {
|
||||
void BaseWindow::SetVibrancy(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
gin_helper::Arguments* args) {
|
||||
std::string type = gin::V8ToString(isolate, value);
|
||||
window_->SetVibrancy(type);
|
||||
gin_helper::Dictionary options;
|
||||
int animation_duration_ms = 0;
|
||||
|
||||
if (args->GetNext(&options)) {
|
||||
options.Get("animationDuration", &animation_duration_ms);
|
||||
}
|
||||
|
||||
window_->SetVibrancy(type, animation_duration_ms);
|
||||
}
|
||||
|
||||
void BaseWindow::SetBackgroundMaterial(const std::string& material_type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue