blob: 6b6833d112ed6f2643dfad7dc6a79e91f456884c (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
 |