aboutsummaryrefslogtreecommitdiff
path: root/src/ThemeBuilder/components/properties/CornerRadiusPropertyEditor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ThemeBuilder/components/properties/CornerRadiusPropertyEditor.h')
-rw-r--r--src/ThemeBuilder/components/properties/CornerRadiusPropertyEditor.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ThemeBuilder/components/properties/CornerRadiusPropertyEditor.h b/src/ThemeBuilder/components/properties/CornerRadiusPropertyEditor.h
new file mode 100644
index 00000000..6b6833d1
--- /dev/null
+++ b/src/ThemeBuilder/components/properties/CornerRadiusPropertyEditor.h
@@ -0,0 +1,28 @@
+#pragma once
+#include "../Editor.h"
+#include "PointPropertyEditor.h"
+#include "cru/ui/Base.h"
+#include "cru/ui/controls/FlexLayout.h"
+
+namespace cru::theme_builder::components::properties {
+class CornerRadiusPropertyEditor : public Editor {
+ public:
+ using PropertyType = ui::CornerRadius;
+
+ CornerRadiusPropertyEditor();
+ ~CornerRadiusPropertyEditor() override;
+
+ ui::controls::Control* GetRootControl() override { return &container_; }
+
+ ui::CornerRadius GetValue() const;
+ void SetValue(const ui::CornerRadius& corner_radius,
+ bool trigger_change = true);
+
+ private:
+ ui::controls::FlexLayout container_;
+ PointPropertyEditor left_top_editor_;
+ PointPropertyEditor right_top_editor_;
+ PointPropertyEditor left_bottom_editor_;
+ PointPropertyEditor right_bottom_editor_;
+};
+} // namespace cru::theme_builder::components::properties