diff options
author | crupest <crupest@outlook.com> | 2020-03-03 00:39:10 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-03-03 00:39:10 +0800 |
commit | b0946c0e6dc163fe981f230302a1976449150907 (patch) | |
tree | 3786417609ec00e42c0e9a102c39238135dfc9b5 /include/cru/ui/ui_manager.hpp | |
parent | ebb8f7beba71fc0d3cd81f60559e4005e05e48d5 (diff) | |
download | cru-b0946c0e6dc163fe981f230302a1976449150907.tar.gz cru-b0946c0e6dc163fe981f230302a1976449150907.tar.bz2 cru-b0946c0e6dc163fe981f230302a1976449150907.zip |
...
Diffstat (limited to 'include/cru/ui/ui_manager.hpp')
-rw-r--r-- | include/cru/ui/ui_manager.hpp | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/include/cru/ui/ui_manager.hpp b/include/cru/ui/ui_manager.hpp index 199ff28d..f196444c 100644 --- a/include/cru/ui/ui_manager.hpp +++ b/include/cru/ui/ui_manager.hpp @@ -11,26 +11,10 @@ struct IFont; } // namespace cru::platform::graph namespace cru::ui { -// TODO: Make this theme resource. -class PredefineResources : public Object { - public: - PredefineResources(); - PredefineResources(const PredefineResources& other) = delete; - PredefineResources(PredefineResources&& other) = delete; - PredefineResources& operator=(const PredefineResources& other) = delete; - PredefineResources& operator=(PredefineResources&& other) = delete; - ~PredefineResources() override = default; - - // region Button - std::shared_ptr<platform::graph::IBrush> button_normal_border_brush; - - // region TextBlock - std::shared_ptr<platform::graph::IBrush> text_block_selection_brush; - std::shared_ptr<platform::graph::IBrush> text_block_text_brush; - std::shared_ptr<platform::graph::IFont> text_block_font; -}; - struct ThemeResources { + std::shared_ptr<platform::graph::IFont> default_font; + std::shared_ptr<platform::graph::IBrush> text_brush; + std::shared_ptr<platform::graph::IBrush> text_selection_brush; controls::ButtonStyle button_style; }; @@ -48,15 +32,9 @@ class UiManager : public Object { UiManager& operator=(UiManager&& other) = delete; ~UiManager() override = default; - const PredefineResources* GetPredefineResources() const { - return predefine_resources_.get(); - } - ThemeResources* GetThemeResources() { return &theme_resource_; } private: - std::unique_ptr<PredefineResources> predefine_resources_; - ThemeResources theme_resource_; }; } // namespace cru::ui |