diff options
Diffstat (limited to 'src/ThemeBuilder/components')
4 files changed, 9 insertions, 7 deletions
diff --git a/src/ThemeBuilder/components/StyleRuleEditor.cpp b/src/ThemeBuilder/components/StyleRuleEditor.cpp index f3de97b4..f57e4654 100644 --- a/src/ThemeBuilder/components/StyleRuleEditor.cpp +++ b/src/ThemeBuilder/components/StyleRuleEditor.cpp @@ -43,7 +43,7 @@ ui::style::StyleRule StyleRuleEditor::GetValue() const { void StyleRuleEditor::SetValue(const ui::style::StyleRule& style_rule, bool trigger_change) { - body_layout_.ClearChildren(); + body_layout_.RemoveAllChild(); condition_editor_ = components::conditions::CreateConditionEditor(style_rule.GetCondition()); styler_editor_ = diff --git a/src/ThemeBuilder/components/StyleRuleSetEditor.cpp b/src/ThemeBuilder/components/StyleRuleSetEditor.cpp index f2509f4f..fd159a44 100644 --- a/src/ThemeBuilder/components/StyleRuleSetEditor.cpp +++ b/src/ThemeBuilder/components/StyleRuleSetEditor.cpp @@ -80,7 +80,7 @@ void StyleRuleSetEditor::UpdateView( }); style_rule_editors_.insert(style_rule_editors_.cbegin() + i, std::move(style_rule_editor)); - rules_layout_.AddChildAt(style_rule_editors_.back()->GetRootControl(), + rules_layout_.InsertChildAt(style_rule_editors_.back()->GetRootControl(), i); } break; diff --git a/src/ThemeBuilder/components/conditions/CompoundConditionEditor.cpp b/src/ThemeBuilder/components/conditions/CompoundConditionEditor.cpp index b9b1fdef..d7324350 100644 --- a/src/ThemeBuilder/components/conditions/CompoundConditionEditor.cpp +++ b/src/ThemeBuilder/components/conditions/CompoundConditionEditor.cpp @@ -63,7 +63,8 @@ CompoundConditionEditor::CompoundConditionEditor() { if (editor) { ConnectChangeEvent(editor.get()); editor->RemoveEvent()->AddSpyOnlyHandler([this, c = editor.get()] { - auto index = this->children_container_.IndexOf(c->GetRootControl()); + auto index = + this->children_container_.IndexOfChild(c->GetRootControl()); this->children_.erase(this->children_.begin() + index); this->children_container_.RemoveChildAt(index); RaiseChangeEvent(); @@ -88,13 +89,13 @@ CompoundConditionEditor::GetChildren() { void CompoundConditionEditor::SetChildren( std::vector<ClonePtr<ui::style::Condition>> children, bool trigger_change) { - children_container_.ClearChildren(); + children_container_.RemoveAllChild(); children_.clear(); for (const auto& condition : children) { auto editor = CreateConditionEditor(condition.get()); ConnectChangeEvent(editor.get()); editor->RemoveEvent()->AddSpyOnlyHandler([this, c = editor.get()] { - auto index = this->children_container_.IndexOf(c->GetRootControl()); + auto index = this->children_container_.IndexOfChild(c->GetRootControl()); this->children_.erase(this->children_.begin() + index); this->children_container_.RemoveChildAt(index); RaiseChangeEvent(); diff --git a/src/ThemeBuilder/components/stylers/CompoundStylerEditor.cpp b/src/ThemeBuilder/components/stylers/CompoundStylerEditor.cpp index 1a20bf70..90d19a68 100644 --- a/src/ThemeBuilder/components/stylers/CompoundStylerEditor.cpp +++ b/src/ThemeBuilder/components/stylers/CompoundStylerEditor.cpp @@ -65,7 +65,8 @@ CompoundStylerEditor::CompoundStylerEditor() { if (editor) { ConnectChangeEvent(editor.get()); editor->RemoveEvent()->AddSpyOnlyHandler([this, c = editor.get()] { - auto index = this->children_container_.IndexOf(c->GetRootControl()); + auto index = + this->children_container_.IndexOfChild(c->GetRootControl()); this->children_.erase(this->children_.begin() + index); this->children_container_.RemoveChildAt(index); RaiseChangeEvent(); @@ -94,7 +95,7 @@ void CompoundStylerEditor::SetValue(ui::style::CompoundStyler* value, auto editor = CreateStylerEditor(styler.get()); ConnectChangeEvent(editor.get()); editor->RemoveEvent()->AddSpyOnlyHandler([this, c = editor.get()] { - auto index = this->children_container_.IndexOf(c->GetRootControl()); + auto index = this->children_container_.IndexOfChild(c->GetRootControl()); this->children_.erase(this->children_.begin() + index); this->children_container_.RemoveChildAt(index); RaiseChangeEvent(); |
