diff options
author | crupest <crupest@outlook.com> | 2021-11-14 22:44:59 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-11-14 22:44:59 +0800 |
commit | 63b4956c3a802ee1c0fd92d1ce56e9330b6de4d2 (patch) | |
tree | f13f592d810b797c4c64803719acbd258565ebce /include/cru/ui | |
parent | a744ed1fea0eaf4d946909da7fdc0a4c0f9c5ec0 (diff) | |
download | cru-63b4956c3a802ee1c0fd92d1ce56e9330b6de4d2.tar.gz cru-63b4956c3a802ee1c0fd92d1ce56e9330b6de4d2.tar.bz2 cru-63b4956c3a802ee1c0fd92d1ce56e9330b6de4d2.zip |
...
Diffstat (limited to 'include/cru/ui')
-rw-r--r-- | include/cru/ui/ThemeManager.hpp | 5 | ||||
-rw-r--r-- | include/cru/ui/render/ScrollBar.hpp | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/include/cru/ui/ThemeManager.hpp b/include/cru/ui/ThemeManager.hpp index 1da29a0e..9908658c 100644 --- a/include/cru/ui/ThemeManager.hpp +++ b/include/cru/ui/ThemeManager.hpp @@ -35,7 +35,7 @@ class ThemeManager : public Object { } gsl::not_null<std::shared_ptr<platform::graphics::IBrush>> GetBrush( - std::u16string key); + StringView key); private: void Init(); @@ -43,8 +43,7 @@ class ThemeManager : public Object { private: Event<std::nullptr_t> theme_resource_change_event_; boost::property_tree::ptree theme_tree_; - std::unordered_map<std::u16string, - std::shared_ptr<platform::graphics::IBrush>> + std::unordered_map<String, std::shared_ptr<platform::graphics::IBrush>> brushes_; }; } // namespace cru::ui diff --git a/include/cru/ui/render/ScrollBar.hpp b/include/cru/ui/render/ScrollBar.hpp index ce6f1b98..d6042719 100644 --- a/include/cru/ui/render/ScrollBar.hpp +++ b/include/cru/ui/render/ScrollBar.hpp @@ -13,7 +13,6 @@ #include "cru/ui/controls/Control.hpp" #include "cru/ui/helper/ClickDetector.hpp" - #include <gsl/pointers> #include <memory> #include <optional> @@ -42,8 +41,8 @@ enum class ScrollBarAreaKind { enum class ScrollBarBrushUsageKind { Arrow, ArrowBackground, Slot, Thumb }; enum class ScrollBarBrushStateKind { Normal, Hover, Press, Disable }; -std::u16string GenerateScrollBarThemeColorKey(ScrollBarBrushUsageKind usage, - ScrollBarBrushStateKind state); +String GenerateScrollBarThemeColorKey(ScrollBarBrushUsageKind usage, + ScrollBarBrushStateKind state); class ScrollBar : public Object { public: |