mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=5e87111d30f695b234fe6e0fee539e8e15453c66$
|
||||
// $hash=c8365b492a81de537ee4d337ca18dae8b3f20e0d$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h"
|
||||
@ -513,6 +513,29 @@ browser_view_delegate_on_blur(struct _cef_view_delegate_t* self,
|
||||
->OnBlur(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
browser_view_delegate_on_theme_changed(struct _cef_view_delegate_t* self,
|
||||
cef_view_t* view) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute
|
||||
CefBrowserViewDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_delegate_t*>(self))
|
||||
->OnThemeChanged(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
@ -544,6 +567,7 @@ CefBrowserViewDelegateCppToC::CefBrowserViewDelegateCppToC() {
|
||||
GetStruct()->base.on_layout_changed = browser_view_delegate_on_layout_changed;
|
||||
GetStruct()->base.on_focus = browser_view_delegate_on_focus;
|
||||
GetStruct()->base.on_blur = browser_view_delegate_on_blur;
|
||||
GetStruct()->base.on_theme_changed = browser_view_delegate_on_theme_changed;
|
||||
}
|
||||
|
||||
// DESTRUCTOR - Do not edit by hand.
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=4dce379ea37fb6976b0af5f46fc1eeccf2e8606d$
|
||||
// $hash=0e5cf49bf903204aa1241520c8acf1cb5767da65$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/button_delegate_cpptoc.h"
|
||||
@ -327,6 +327,28 @@ void CEF_CALLBACK button_delegate_on_blur(struct _cef_view_delegate_t* self,
|
||||
->OnBlur(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
button_delegate_on_theme_changed(struct _cef_view_delegate_t* self,
|
||||
cef_view_t* view) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute
|
||||
CefButtonDelegateCppToC::Get(reinterpret_cast<cef_button_delegate_t*>(self))
|
||||
->OnThemeChanged(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
@ -347,6 +369,7 @@ CefButtonDelegateCppToC::CefButtonDelegateCppToC() {
|
||||
GetStruct()->base.on_layout_changed = button_delegate_on_layout_changed;
|
||||
GetStruct()->base.on_focus = button_delegate_on_focus;
|
||||
GetStruct()->base.on_blur = button_delegate_on_blur;
|
||||
GetStruct()->base.on_theme_changed = button_delegate_on_theme_changed;
|
||||
}
|
||||
|
||||
// DESTRUCTOR - Do not edit by hand.
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=5e0418c416ecd0c23cb7fcc9d6a52ef06ba86686$
|
||||
// $hash=e279bb0412c82b1235a5f4cd860ad2d5aab07042$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h"
|
||||
@ -376,6 +376,29 @@ menu_button_delegate_on_blur(struct _cef_view_delegate_t* self,
|
||||
->OnBlur(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
menu_button_delegate_on_theme_changed(struct _cef_view_delegate_t* self,
|
||||
cef_view_t* view) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute
|
||||
CefMenuButtonDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_menu_button_delegate_t*>(self))
|
||||
->OnThemeChanged(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
@ -404,6 +427,8 @@ CefMenuButtonDelegateCppToC::CefMenuButtonDelegateCppToC() {
|
||||
menu_button_delegate_on_layout_changed;
|
||||
GetStruct()->base.base.on_focus = menu_button_delegate_on_focus;
|
||||
GetStruct()->base.base.on_blur = menu_button_delegate_on_blur;
|
||||
GetStruct()->base.base.on_theme_changed =
|
||||
menu_button_delegate_on_theme_changed;
|
||||
}
|
||||
|
||||
// DESTRUCTOR - Do not edit by hand.
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=cb28c29eeb68707fb9b164f539804a6d8a7e61be$
|
||||
// $hash=cb2d1231eb279cea9a132af8bded03032307cb45$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/panel_delegate_cpptoc.h"
|
||||
@ -282,6 +282,28 @@ void CEF_CALLBACK panel_delegate_on_blur(struct _cef_view_delegate_t* self,
|
||||
->OnBlur(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
panel_delegate_on_theme_changed(struct _cef_view_delegate_t* self,
|
||||
cef_view_t* view) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute
|
||||
CefPanelDelegateCppToC::Get(reinterpret_cast<cef_panel_delegate_t*>(self))
|
||||
->OnThemeChanged(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
@ -299,6 +321,7 @@ CefPanelDelegateCppToC::CefPanelDelegateCppToC() {
|
||||
GetStruct()->base.on_layout_changed = panel_delegate_on_layout_changed;
|
||||
GetStruct()->base.on_focus = panel_delegate_on_focus;
|
||||
GetStruct()->base.on_blur = panel_delegate_on_blur;
|
||||
GetStruct()->base.on_theme_changed = panel_delegate_on_theme_changed;
|
||||
}
|
||||
|
||||
// DESTRUCTOR - Do not edit by hand.
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=e0a80958b419a73b1f57655ef19f4aa7064bd19d$
|
||||
// $hash=3a3696160ea6f07beb0a7c68e415e2c71490963e$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h"
|
||||
@ -344,6 +344,29 @@ void CEF_CALLBACK textfield_delegate_on_blur(struct _cef_view_delegate_t* self,
|
||||
->OnBlur(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
textfield_delegate_on_theme_changed(struct _cef_view_delegate_t* self,
|
||||
cef_view_t* view) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute
|
||||
CefTextfieldDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_textfield_delegate_t*>(self))
|
||||
->OnThemeChanged(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
@ -364,6 +387,7 @@ CefTextfieldDelegateCppToC::CefTextfieldDelegateCppToC() {
|
||||
GetStruct()->base.on_layout_changed = textfield_delegate_on_layout_changed;
|
||||
GetStruct()->base.on_focus = textfield_delegate_on_focus;
|
||||
GetStruct()->base.on_blur = textfield_delegate_on_blur;
|
||||
GetStruct()->base.on_theme_changed = textfield_delegate_on_theme_changed;
|
||||
}
|
||||
|
||||
// DESTRUCTOR - Do not edit by hand.
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=a73bcac096d32c3a63cca3f3006d70a803c00626$
|
||||
// $hash=bd18088799d97c56459bce12fb0cb2177caecead$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h"
|
||||
@ -281,6 +281,27 @@ void CEF_CALLBACK view_delegate_on_blur(struct _cef_view_delegate_t* self,
|
||||
CefViewDelegateCppToC::Get(self)->OnBlur(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
view_delegate_on_theme_changed(struct _cef_view_delegate_t* self,
|
||||
cef_view_t* view) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute
|
||||
CefViewDelegateCppToC::Get(self)->OnThemeChanged(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
@ -296,6 +317,7 @@ CefViewDelegateCppToC::CefViewDelegateCppToC() {
|
||||
GetStruct()->on_layout_changed = view_delegate_on_layout_changed;
|
||||
GetStruct()->on_focus = view_delegate_on_focus;
|
||||
GetStruct()->on_blur = view_delegate_on_blur;
|
||||
GetStruct()->on_theme_changed = view_delegate_on_theme_changed;
|
||||
}
|
||||
|
||||
// DESTRUCTOR - Do not edit by hand.
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=1f438b082c8c499084a3e494e1bb83adaecf91d1$
|
||||
// $hash=1829e6ed7282ca9a0b34e825a11c229ddd48590d$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/window_delegate_cpptoc.h"
|
||||
@ -793,6 +793,28 @@ void CEF_CALLBACK window_delegate_on_blur(struct _cef_view_delegate_t* self,
|
||||
->OnBlur(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
window_delegate_on_theme_changed(struct _cef_view_delegate_t* self,
|
||||
cef_view_t* view) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute
|
||||
CefWindowDelegateCppToC::Get(reinterpret_cast<cef_window_delegate_t*>(self))
|
||||
->OnThemeChanged(CefViewCToCpp::Wrap(view));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
@ -835,6 +857,7 @@ CefWindowDelegateCppToC::CefWindowDelegateCppToC() {
|
||||
GetStruct()->base.base.on_layout_changed = window_delegate_on_layout_changed;
|
||||
GetStruct()->base.base.on_focus = window_delegate_on_focus;
|
||||
GetStruct()->base.base.on_blur = window_delegate_on_blur;
|
||||
GetStruct()->base.base.on_theme_changed = window_delegate_on_theme_changed;
|
||||
}
|
||||
|
||||
// DESTRUCTOR - Do not edit by hand.
|
||||
|
Reference in New Issue
Block a user