feat: enable Windows Control Overlay on Linux (#41769)

This commit is contained in:
Shelley Vohr 2024-06-27 14:56:36 +02:00 committed by GitHub
parent 1d4b00692d
commit 32e5012017
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 1026 additions and 107 deletions

View file

@ -372,12 +372,23 @@ class NativeWindow : public base::SupportsUserData,
kHiddenInset,
kCustomButtonsOnHover,
};
TitleBarStyle title_bar_style() const { return title_bar_style_; }
bool IsWindowControlsOverlayEnabled() const {
bool valid_titlebar_style = title_bar_style() == TitleBarStyle::kHidden
#if BUILDFLAG(IS_MAC)
||
title_bar_style() == TitleBarStyle::kHiddenInset
#endif
;
return valid_titlebar_style && titlebar_overlay_;
}
int titlebar_overlay_height() const { return titlebar_overlay_height_; }
void set_titlebar_overlay_height(int height) {
titlebar_overlay_height_ = height;
}
bool titlebar_overlay_enabled() const { return titlebar_overlay_; }
bool has_frame() const { return has_frame_; }
void set_has_frame(bool has_frame) { has_frame_ = has_frame; }