views: Use default theme background color for all controls (see #3671)

Add new CefViewDelegate::OnThemeChanged callback for optionally overriding
default theme colors when the current theme changes.
This commit is contained in:
Marshall Greenblatt
2024-03-22 19:51:00 -04:00
parent a13b6dc7f6
commit 19ba8b2b8d
43 changed files with 510 additions and 102 deletions

View File

@@ -17,7 +17,7 @@ namespace client {
// Implements window overlay controls that receive absolute positioning on top
// of the browser view. All methods must be called on the browser process UI
// thread.
class ViewsOverlayControls : public CefButtonDelegate {
class ViewsOverlayControls : public CefButtonDelegate, public CefPanelDelegate {
public:
enum class Command {
kMinimize = 1,
@@ -43,6 +43,9 @@ class ViewsOverlayControls : public CefButtonDelegate {
// CefButtonDelegate methods:
void OnButtonPressed(CefRefPtr<CefButton> button) override;
// CefViewDelegate methods:
void OnThemeChanged(CefRefPtr<CefView> view) override;
CefRefPtr<CefLabelButton> CreateButton(Command command);
void MaybeUpdateMaximizeButton();