feat: support more color formats for backgroundColor
(#31868)
This commit is contained in:
parent
4b8b492b62
commit
db79734bfb
13 changed files with 144 additions and 55 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue