mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: remove some NativeWindow public API (#46919)
* refactor: make NativeWindow::titlebar_overlay_height_ private * refactor: make NativeWindow::set_has_frame() protected * refactor: remove NativeWindow::background_material() It's only used once, in NativeWindow, so use |background_material_| directly. * refactor: remove NativeWindow::vibrancy() It's only used once, in a NativeWindow method, so use |vibrancy_| directly. * refactor: unfriend api::BrowserView It was added in Oct 2022 by23d4a25for access to protected NativeWindow methods add_inspectable_view() and remove_inspectable_view(). That dependency was removed in Nov 2022 by184ac2b, so BrowserView doesn't need access to NativeWindow's private fields & methods anymore. * refactor: make NativeWindow::ContentBoundsToWindowBounds() protected refactor: make NativeWindow::WindowBoundsToContentBounds() protected
This commit is contained in:
@@ -830,17 +830,14 @@ bool NativeWindow::IsTranslucent() const {
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// Windows with vibrancy set are translucent
|
||||
if (!vibrancy().empty()) {
|
||||
if (!vibrancy_.empty())
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// Windows with certain background materials may be translucent
|
||||
const std::string& bg_material = background_material();
|
||||
if (!bg_material.empty() && bg_material != "none") {
|
||||
if (!background_material_.empty() && background_material_ != "none")
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user