aboutsummaryrefslogtreecommitdiff
path: root/src/ui/ThemeManager.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-11-14 22:44:59 +0800
committercrupest <crupest@outlook.com>2021-11-14 22:44:59 +0800
commit63b4956c3a802ee1c0fd92d1ce56e9330b6de4d2 (patch)
treef13f592d810b797c4c64803719acbd258565ebce /src/ui/ThemeManager.cpp
parenta744ed1fea0eaf4d946909da7fdc0a4c0f9c5ec0 (diff)
downloadcru-63b4956c3a802ee1c0fd92d1ce56e9330b6de4d2.tar.gz
cru-63b4956c3a802ee1c0fd92d1ce56e9330b6de4d2.tar.bz2
cru-63b4956c3a802ee1c0fd92d1ce56e9330b6de4d2.zip
...
Diffstat (limited to 'src/ui/ThemeManager.cpp')
-rw-r--r--src/ui/ThemeManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/ThemeManager.cpp b/src/ui/ThemeManager.cpp
index 4a0e08a5..a5280d40 100644
--- a/src/ui/ThemeManager.cpp
+++ b/src/ui/ThemeManager.cpp
@@ -36,15 +36,15 @@ void ThemeManager::Init() {
}
gsl::not_null<std::shared_ptr<platform::graphics::IBrush>>
-ThemeManager::GetBrush(std::u16string key) {
- std::u16string k = ToLower(key);
+ThemeManager::GetBrush(StringView key) {
+ String k = ToLower(key);
auto cached_brush_iter = brushes_.find(k);
if (cached_brush_iter != brushes_.cend()) {
return cached_brush_iter->second;
}
auto color_string =
- String::FromUtf8(theme_tree_.get<std::string>(ToUtf8(key)));
+ String::FromUtf8(theme_tree_.get<std::string>(key.ToUtf8()));
auto color = Color::Parse(color_string);
if (!color) throw BadThemeResourceException("Value is not a valid color.");
std::shared_ptr<platform::graphics::IBrush> brush =