aboutsummaryrefslogtreecommitdiff
path: root/src/theme_builder/components/stylers
diff options
context:
space:
mode:
Diffstat (limited to 'src/theme_builder/components/stylers')
-rw-r--r--src/theme_builder/components/stylers/CompoundStylerEditor.cpp13
-rw-r--r--src/theme_builder/components/stylers/CompoundStylerEditor.h5
2 files changed, 10 insertions, 8 deletions
diff --git a/src/theme_builder/components/stylers/CompoundStylerEditor.cpp b/src/theme_builder/components/stylers/CompoundStylerEditor.cpp
index 258eeb26..e5a7f32e 100644
--- a/src/theme_builder/components/stylers/CompoundStylerEditor.cpp
+++ b/src/theme_builder/components/stylers/CompoundStylerEditor.cpp
@@ -15,9 +15,9 @@ CompoundStylerEditorChild::CompoundStylerEditorChild(
remove_button_.GetStyleRuleSet()->SetParent(
ui::ThemeManager::GetInstance()->GetResourceStyleRuleSet(
u"cru.theme_builder.icon-button.style"));
- remove_button_.SetChild(&remove_button_text_);
- remove_button_text_.SetText(u"x");
- remove_button_text_.SetTextColor(ui::colors::red);
+ remove_button_.SetIconWithSvgPathDataStringResourceKey(u"icon.close",
+ {0, 0, 16, 16});
+ remove_button_.SetIconFillColor(ui::colors::red);
container_.AddChild(styler_editor_->GetRootControl());
@@ -35,11 +35,14 @@ CompoundStylerEditor::CompoundStylerEditor() {
ui::controls::FlexCrossAlignment::Start);
GetHeadContainer()->AddChild(add_child_button_.GetRootControl());
- add_child_button_.SetButtonText(u"+");
add_child_button_.GetButton()->GetStyleRuleSet()->SetParent(
ui::ThemeManager::GetInstance()->GetResourceStyleRuleSet(
u"cru.theme_builder.icon-button.style"));
- add_child_button_.SetButtonTextColor(ui::colors::green);
+ add_child_button_.GetButton()->SetIconWithSvgPathDataStringResourceKey(
+ u"icon.plus", {0, 0, 16, 16});
+ add_child_button_.GetButton()->SetPreferredSize({24, 24});
+ add_child_button_.GetButton()->SetPadding(ui::Thickness(2));
+ add_child_button_.GetButton()->SetIconFillColor(ui::colors::green);
add_child_button_.SetMenuItems({
u"Compound Styler",
u"Border Styler",
diff --git a/src/theme_builder/components/stylers/CompoundStylerEditor.h b/src/theme_builder/components/stylers/CompoundStylerEditor.h
index 33a3d7cf..fe9fb47c 100644
--- a/src/theme_builder/components/stylers/CompoundStylerEditor.h
+++ b/src/theme_builder/components/stylers/CompoundStylerEditor.h
@@ -20,8 +20,7 @@ class CompoundStylerEditorChild : public ui::components::Component {
private:
ui::controls::FlexLayout container_;
- ui::controls::Button remove_button_;
- ui::controls::TextBlock remove_button_text_;
+ ui::controls::IconButton remove_button_;
std::unique_ptr<StylerEditor> styler_editor_;
Event<std::nullptr_t> remove_event_;
@@ -45,6 +44,6 @@ class CompoundStylerEditor : public StylerEditor {
private:
ui::controls::FlexLayout children_container_;
std::vector<std::unique_ptr<CompoundStylerEditorChild>> children_;
- ui::components::PopupMenuTextButton add_child_button_;
+ ui::components::PopupMenuIconButton add_child_button_;
};
} // namespace cru::theme_builder::components::stylers