aboutsummaryrefslogtreecommitdiff
path: root/src/ui/style/StyleRule.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-12-03 20:51:53 +0800
committercrupest <crupest@outlook.com>2020-12-03 20:51:53 +0800
commit93a8bf8b967817031cd2798cdaedfa73f867dead (patch)
tree0e1a2a72ad0e07c0f670a6feb87f211929788f0e /src/ui/style/StyleRule.cpp
parentc6baeb6432a4db7433aab4fc8f89cc235473f11a (diff)
downloadcru-93a8bf8b967817031cd2798cdaedfa73f867dead.tar.gz
cru-93a8bf8b967817031cd2798cdaedfa73f867dead.tar.bz2
cru-93a8bf8b967817031cd2798cdaedfa73f867dead.zip
...
Diffstat (limited to 'src/ui/style/StyleRule.cpp')
-rw-r--r--src/ui/style/StyleRule.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/style/StyleRule.cpp b/src/ui/style/StyleRule.cpp
index 4a5ecf7e..1a72a970 100644
--- a/src/ui/style/StyleRule.cpp
+++ b/src/ui/style/StyleRule.cpp
@@ -1,6 +1,12 @@
#include "cru/ui/style/StyleRule.hpp"
namespace cru::ui::style {
+StyleRule::StyleRule(ClonablePtr<Condition> condition,
+ ClonablePtr<Styler> styler, std::u16string name)
+ : condition_(std::move(condition)),
+ styler_(std::move(styler)),
+ name_(std::move(name)) {}
+
bool StyleRule::CheckAndApply(controls::Control *control) const {
auto active = condition_->Judge(control);
if (active) {