fix: WCO respects maximizable/closable/minimizable (#34677)

This commit is contained in:
Shelley Vohr 2022-06-23 19:08:32 +02:00 committed by GitHub
parent 106aa0e922
commit 3b881e4a13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 44 additions and 6 deletions

View file

@ -41,6 +41,11 @@ class WinCaptionButtonContainer : public views::View,
gfx::Size GetButtonSize() const;
void SetButtonSize(gfx::Size size);
// Sets caption button visibility and enabled state based on window state.
// Only one of maximize or restore button should ever be visible at the same
// time, and both are disabled in tablet UI mode.
void UpdateButtons();
private:
// views::View:
void AddedToWidget() override;
@ -52,11 +57,6 @@ class WinCaptionButtonContainer : public views::View,
void ResetWindowControls();
// Sets caption button visibility and enabled state based on window state.
// Only one of maximize or restore button should ever be visible at the same
// time, and both are disabled in tablet UI mode.
void UpdateButtons();
WinFrameView* const frame_view_;
WinCaptionButton* const minimize_button_;
WinCaptionButton* const maximize_button_;