diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-10-17 12:06:14 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-10-17 12:06:14 +0800 |
commit | 32aa6f116acc6e3e20a1ec76cef45b29f7005ad7 (patch) | |
tree | 892b71060a88b58d9293d78033000b05818783df /src/ui/ThemeManager.cpp | |
parent | faf77949e19dc0d01f75bf8abb783eda70328048 (diff) | |
download | cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.gz cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.bz2 cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.zip |
Remove String stage 1.
Diffstat (limited to 'src/ui/ThemeManager.cpp')
-rw-r--r-- | src/ui/ThemeManager.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/ui/ThemeManager.cpp b/src/ui/ThemeManager.cpp index a95900b4..0f4daeb7 100644 --- a/src/ui/ThemeManager.cpp +++ b/src/ui/ThemeManager.cpp @@ -1,14 +1,9 @@ #include "cru/ui/ThemeManager.h" -#include "Helper.h" -#include "cru/base/StringUtil.h" #include "cru/base/io/Resource.h" #include "cru/platform/graphics/Brush.h" -#include "cru/platform/graphics/Factory.h" -#include "cru/platform/gui/UiApplication.h" #include "cru/ui/ThemeResourceDictionary.h" #include "cru/ui/style/StyleRuleSet.h" -#include "cru/xml/XmlParser.h" namespace cru::ui { ThemeManager* ThemeManager::GetInstance() { @@ -48,22 +43,22 @@ void ThemeManager::PrependThemeResourceDictionary( theme_resource_change_event_.Raise(nullptr); } -String ThemeManager::GetResourceString(const String& key) { - return GetResource<String>(key); +std::string ThemeManager::GetResourceString(std::string_view key) { + return GetResource<String>(key).ToUtf8(); } std::shared_ptr<platform::graphics::IBrush> ThemeManager::GetResourceBrush( - const String& key) { + std::string_view key) { return GetResource<std::shared_ptr<platform::graphics::IBrush>>(key); } std::shared_ptr<platform::graphics::IFont> ThemeManager::GetResourceFont( - const String& key) { + std::string_view key) { return GetResource<std::shared_ptr<platform::graphics::IFont>>(key); } std::shared_ptr<style::StyleRuleSet> ThemeManager::GetResourceStyleRuleSet( - const String& key) { + std::string_view key) { return GetResource<std::shared_ptr<style::StyleRuleSet>>(key); } } // namespace cru::ui |