mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
fix: Set background for WCO container (#35569)
* fix: Set background for WCO container * Add background when invalidating as well
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "shell/browser/ui/views/win_frame_view.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/strings/grit/ui_strings.h"
|
||||
#include "ui/views/background.h"
|
||||
#include "ui/views/layout/flex_layout.h"
|
||||
#include "ui/views/view_class_properties.h"
|
||||
|
||||
@@ -128,6 +129,8 @@ void WinCaptionButtonContainer::AddedToWidget() {
|
||||
UpdateButtons();
|
||||
|
||||
if (frame_view_->window()->IsWindowControlsOverlayEnabled()) {
|
||||
SetBackground(views::CreateSolidBackground(
|
||||
frame_view_->window()->overlay_button_color()));
|
||||
SetPaintToLayer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "ui/display/win/dpi.h"
|
||||
#include "ui/display/win/screen_win.h"
|
||||
#include "ui/gfx/geometry/dip_util.h"
|
||||
#include "ui/views/background.h"
|
||||
#include "ui/views/widget/widget.h"
|
||||
#include "ui/views/win/hwnd_util.h"
|
||||
|
||||
@@ -58,6 +59,8 @@ void WinFrameView::InvalidateCaptionButtons() {
|
||||
if (!caption_button_container_)
|
||||
return;
|
||||
|
||||
caption_button_container_->SetBackground(
|
||||
views::CreateSolidBackground(window()->overlay_button_color()));
|
||||
caption_button_container_->InvalidateLayout();
|
||||
caption_button_container_->SchedulePaint();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user