aboutsummaryrefslogtreecommitdiff
path: root/src/ui/style/StyleRule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/style/StyleRule.cpp')
-rw-r--r--src/ui/style/StyleRule.cpp11
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