mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
refactor: add NativeWindowViews::SetTitleBarOverlay() (#47126)
* refactor: move SetTitleBarOverlay() impl to NativeWindowViews * refactor: make NativeWindowViews::set_overlay_button_color() private refactor: make NativeWindowViews::set_overlay_symbol_color() private refactor: make NativeWindow::set_titlebar_overlay_height() protected * refactor: simplify downcasting in NativeWindowViews::SetTitleBarOverlay()
This commit is contained in:
@@ -394,9 +394,6 @@ class NativeWindow : public base::SupportsUserData,
|
||||
}
|
||||
|
||||
int titlebar_overlay_height() const { return titlebar_overlay_height_; }
|
||||
void set_titlebar_overlay_height(int height) {
|
||||
titlebar_overlay_height_ = height;
|
||||
}
|
||||
|
||||
bool has_frame() const { return has_frame_; }
|
||||
|
||||
@@ -431,6 +428,10 @@ class NativeWindow : public base::SupportsUserData,
|
||||
void UpdateBackgroundThrottlingState();
|
||||
|
||||
protected:
|
||||
void set_titlebar_overlay_height(int height) {
|
||||
titlebar_overlay_height_ = height;
|
||||
}
|
||||
|
||||
constexpr void set_has_frame(const bool val) { has_frame_ = val; }
|
||||
|
||||
[[nodiscard]] constexpr bool is_closed() const { return is_closed_; }
|
||||
|
||||
Reference in New Issue
Block a user