diff options
author | crupest <crupest@outlook.com> | 2020-12-02 20:50:26 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-12-02 20:50:26 +0800 |
commit | c6baeb6432a4db7433aab4fc8f89cc235473f11a (patch) | |
tree | dee45567f87a33a52de752fbc234a7f09bd41245 /src/ui/style/StyleRule.cpp | |
parent | 7cb333e847eec701b0cb3577a84f0107a5be7602 (diff) | |
download | cru-c6baeb6432a4db7433aab4fc8f89cc235473f11a.tar.gz cru-c6baeb6432a4db7433aab4fc8f89cc235473f11a.tar.bz2 cru-c6baeb6432a4db7433aab4fc8f89cc235473f11a.zip |
...
Diffstat (limited to 'src/ui/style/StyleRule.cpp')
-rw-r--r-- | src/ui/style/StyleRule.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ui/style/StyleRule.cpp b/src/ui/style/StyleRule.cpp new file mode 100644 index 00000000..4a5ecf7e --- /dev/null +++ b/src/ui/style/StyleRule.cpp @@ -0,0 +1,11 @@ +#include "cru/ui/style/StyleRule.hpp" + +namespace cru::ui::style { +bool StyleRule::CheckAndApply(controls::Control *control) const { + auto active = condition_->Judge(control); + if (active) { + styler_->Apply(control); + } + return active; +} +} // namespace cru::ui::style |