aboutsummaryrefslogtreecommitdiff
path: root/src/ui/style
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-02-24 16:35:08 +0800
committercrupest <crupest@outlook.com>2022-02-24 16:35:08 +0800
commite80f44385dee8636b747848ecb6193c41a99d89c (patch)
treed004d27715d5bbaa3fd087dc8570787eae0549ca /src/ui/style
parenta7f5275267e1b504b119e2e3b7fcd46a88874821 (diff)
downloadcru-e80f44385dee8636b747848ecb6193c41a99d89c.tar.gz
cru-e80f44385dee8636b747848ecb6193c41a99d89c.tar.bz2
cru-e80f44385dee8636b747848ecb6193c41a99d89c.zip
...
Diffstat (limited to 'src/ui/style')
-rw-r--r--src/ui/style/StyleRuleSet.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/style/StyleRuleSet.cpp b/src/ui/style/StyleRuleSet.cpp
index c8d12500..6b475c8c 100644
--- a/src/ui/style/StyleRuleSet.cpp
+++ b/src/ui/style/StyleRuleSet.cpp
@@ -112,10 +112,9 @@ void StyleRuleSetBind::UpdateStyle() {
// reverse.
for (auto iter = ruleset_chain_cache_.crbegin();
iter != ruleset_chain_cache_.crend(); ++iter) {
- for (const auto& rule : (*iter)->GetRules())
- if (rule.GetCondition()->Judge(control_)) {
- rule.GetStyler()->Apply(control_);
- }
+ for (const auto& rule : (*iter)->GetRules()) {
+ rule.CheckAndApply(control_);
+ }
}
}
} // namespace cru::ui::style