feat: add optional animation parameter to BrowserWindow.setVibrancy (#35987)

adds optional animation parameter to BrowserWindow.setVibrancy
This commit is contained in:
Gellert Hegyi 2024-11-12 18:03:30 +01:00 committed by GitHub
parent a6390b539c
commit 7a79d4c96e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 66 additions and 19 deletions

View file

@ -254,7 +254,7 @@ void NativeWindow::InitFromOptions(const gin_helper::Dictionary& options) {
#if BUILDFLAG(IS_MAC)
std::string type;
if (options.Get(options::kVibrancyType, &type)) {
SetVibrancy(type);
SetVibrancy(type, 0);
}
#elif BUILDFLAG(IS_WIN)
std::string material;
@ -461,7 +461,7 @@ std::optional<std::string> NativeWindow::GetTabbingIdentifier() const {
return ""; // for non-Mac platforms
}
void NativeWindow::SetVibrancy(const std::string& type) {
void NativeWindow::SetVibrancy(const std::string& type, int duration) {
vibrancy_ = type;
}