diff options
author | crupest <crupest@outlook.com> | 2021-10-21 17:44:56 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-10-21 17:44:56 +0800 |
commit | 72fc892792565ef39fcae6b7d2a19006dc3a3238 (patch) | |
tree | ea1609b424215e6fe86d6280ce86beea0c73b61b /src/ui/ThemeManager.cpp | |
parent | fc9cd10a84ea92dd702ac84d302ca46198d17d23 (diff) | |
download | cru-72fc892792565ef39fcae6b7d2a19006dc3a3238.tar.gz cru-72fc892792565ef39fcae6b7d2a19006dc3a3238.tar.bz2 cru-72fc892792565ef39fcae6b7d2a19006dc3a3238.zip |
...
Diffstat (limited to 'src/ui/ThemeManager.cpp')
-rw-r--r-- | src/ui/ThemeManager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ui/ThemeManager.cpp b/src/ui/ThemeManager.cpp index be986bb5..4a0e08a5 100644 --- a/src/ui/ThemeManager.cpp +++ b/src/ui/ThemeManager.cpp @@ -16,7 +16,7 @@ ThemeManager::ThemeManager() { Init(); } void ThemeManager::Init() { theme_tree_.put("scrollbar.collapse-thumb.color", - colors::gray.WithAlpha(128).ToUtf8String()); + colors::gray.WithAlpha(128).ToString().ToUtf8()); theme_tree_.put("scrollbar.arrow.normal.color", "#505050"); theme_tree_.put("scrollbar.arrow.hover.color", "#505050"); theme_tree_.put("scrollbar.arrow.press.color", "#ffffff"); @@ -43,11 +43,12 @@ ThemeManager::GetBrush(std::u16string key) { return cached_brush_iter->second; } - auto color_string = ToUtf16(theme_tree_.get<std::string>(ToUtf8(key))); + auto color_string = + String::FromUtf8(theme_tree_.get<std::string>(ToUtf8(key))); auto color = Color::Parse(color_string); if (!color) throw BadThemeResourceException("Value is not a valid color."); std::shared_ptr<platform::graphics::IBrush> brush = - GetUiApplication()->GetGraphFactory()->CreateSolidColorBrush(*color); + GetUiApplication()->GetGraphicsFactory()->CreateSolidColorBrush(*color); brushes_[k] = brush; return brush; } |