feat: add WCO title bar style setters (#33066)
* feat: add wco title bar style setters * return after throwing
This commit is contained in:
parent
4fdf8584ed
commit
f69b59effc
8 changed files with 108 additions and 0 deletions
|
@ -100,6 +100,8 @@ void WinCaptionButton::SetSize(gfx::Size size) {
|
|||
base_width_ = width;
|
||||
if (height > 0)
|
||||
height_ = height;
|
||||
|
||||
InvalidateLayout();
|
||||
}
|
||||
|
||||
int WinCaptionButton::GetBetweenButtonSpacing() const {
|
||||
|
|
|
@ -62,6 +62,14 @@ SkColor WinFrameView::GetReadableFeatureColor(SkColor background_color) {
|
|||
: SK_ColorBLACK;
|
||||
}
|
||||
|
||||
void WinFrameView::InvalidateCaptionButtons() {
|
||||
// Ensure that the caption buttons container exists
|
||||
DCHECK(caption_button_container_);
|
||||
|
||||
caption_button_container_->InvalidateLayout();
|
||||
caption_button_container_->SchedulePaint();
|
||||
}
|
||||
|
||||
gfx::Rect WinFrameView::GetWindowBoundsForClientBounds(
|
||||
const gfx::Rect& client_bounds) const {
|
||||
return views::GetWindowBoundsForClientBounds(
|
||||
|
|
|
@ -30,6 +30,9 @@ class WinFrameView : public FramelessView {
|
|||
|
||||
SkColor GetReadableFeatureColor(SkColor background_color);
|
||||
|
||||
// Tells the NonClientView to invalidate the WinFrameView's caption buttons.
|
||||
void InvalidateCaptionButtons();
|
||||
|
||||
// views::NonClientFrameView:
|
||||
gfx::Rect GetWindowBoundsForClientBounds(
|
||||
const gfx::Rect& client_bounds) const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue