mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: support more color formats for backgroundColor (#31868)
This commit is contained in:
@@ -643,11 +643,11 @@ bool BaseWindow::IsTabletMode() const {
|
||||
}
|
||||
|
||||
void BaseWindow::SetBackgroundColor(const std::string& color_name) {
|
||||
SkColor color = ParseHexColor(color_name);
|
||||
SkColor color = ParseCSSColor(color_name);
|
||||
window_->SetBackgroundColor(color);
|
||||
}
|
||||
|
||||
std::string BaseWindow::GetBackgroundColor() {
|
||||
std::string BaseWindow::GetBackgroundColor(gin_helper::Arguments* args) {
|
||||
return ToRGBHex(window_->GetBackgroundColor());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user