mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: expose window.invalidateShadow() (#32452)
Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
@@ -639,6 +639,10 @@ std::string BaseWindow::GetBackgroundColor(gin_helper::Arguments* args) {
|
||||
return ToRGBHex(window_->GetBackgroundColor());
|
||||
}
|
||||
|
||||
void BaseWindow::InvalidateShadow() {
|
||||
window_->InvalidateShadow();
|
||||
}
|
||||
|
||||
void BaseWindow::SetHasShadow(bool has_shadow) {
|
||||
window_->SetHasShadow(has_shadow);
|
||||
}
|
||||
@@ -1259,6 +1263,7 @@ void BaseWindow::BuildPrototype(v8::Isolate* isolate,
|
||||
.SetMethod("isVisibleOnAllWorkspaces",
|
||||
&BaseWindow::IsVisibleOnAllWorkspaces)
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
.SetMethod("invalidateShadow", &BaseWindow::InvalidateShadow)
|
||||
.SetMethod("_getAlwaysOnTopLevel", &BaseWindow::GetAlwaysOnTopLevel)
|
||||
.SetMethod("setAutoHideCursor", &BaseWindow::SetAutoHideCursor)
|
||||
#endif
|
||||
|
||||
@@ -156,6 +156,7 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
|
||||
bool IsTabletMode() const;
|
||||
virtual void SetBackgroundColor(const std::string& color_name);
|
||||
std::string GetBackgroundColor(gin_helper::Arguments* args);
|
||||
void InvalidateShadow();
|
||||
void SetHasShadow(bool has_shadow);
|
||||
bool HasShadow();
|
||||
void SetOpacity(const double opacity);
|
||||
|
||||
Reference in New Issue
Block a user