From 4e0b7d82cd64ef8016dcb49247a8a5e4de8a0b3d Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Sun, 16 Nov 2025 10:37:36 +0800 Subject: Rename ClonePtr, update theme. --- include/cru/ui/style/StyleRule.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'include/cru/ui/style/StyleRule.h') diff --git a/include/cru/ui/style/StyleRule.h b/include/cru/ui/style/StyleRule.h index 382cd664..dd0d8780 100644 --- a/include/cru/ui/style/StyleRule.h +++ b/include/cru/ui/style/StyleRule.h @@ -2,7 +2,7 @@ #include "../Base.h" #include "Condition.h" #include "Styler.h" -#include "cru/base/ClonablePtr.h" +#include "cru/base/ClonePtr.h" namespace cru::ui::style { /** @@ -11,14 +11,14 @@ namespace cru::ui::style { */ class CRU_UI_API StyleRule { public: - static ClonablePtr Create(ClonablePtr condition, - ClonablePtr styler, + static ClonePtr Create(ClonePtr condition, + ClonePtr styler, std::string name = {}) { - return ClonablePtr(new StyleRule( + return ClonePtr(new StyleRule( std::move(condition), std::move(styler), std::move(name))); } - StyleRule(ClonablePtr condition, ClonablePtr styler, + StyleRule(ClonePtr condition, ClonePtr styler, std::string name = {}); public: @@ -26,12 +26,12 @@ class CRU_UI_API StyleRule { Condition* GetCondition() const { return condition_.get(); } Styler* GetStyler() const { return styler_.get(); } - StyleRule WithNewCondition(ClonablePtr condition, + StyleRule WithNewCondition(ClonePtr condition, std::string name = {}) const { return StyleRule{std::move(condition), styler_, std::move(name)}; } - StyleRule WithNewStyler(ClonablePtr styler, + StyleRule WithNewStyler(ClonePtr styler, std::string name = {}) const { return StyleRule{condition_, std::move(styler), std::move(name)}; } @@ -39,8 +39,8 @@ class CRU_UI_API StyleRule { bool CheckAndApply(controls::Control* control) const; private: - ClonablePtr condition_; - ClonablePtr styler_; + ClonePtr condition_; + ClonePtr styler_; std::string name_; }; } // namespace cru::ui::style -- cgit v1.2.3