From 0f8f98b9005803ab154b43dcad0db1f292072a4d Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Mon, 17 Nov 2025 12:54:55 +0800 Subject: Refactor window host. --- include/cru/ui/Base.h | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'include/cru/ui/Base.h') diff --git a/include/cru/ui/Base.h b/include/cru/ui/Base.h index 3f270b39..9e24cfa2 100644 --- a/include/cru/ui/Base.h +++ b/include/cru/ui/Base.h @@ -35,12 +35,9 @@ namespace colors = cru::platform::colors; namespace controls { class Control; +class Window; } // namespace controls -namespace host { -class WindowHost; -} - //-------------------- region: basic types -------------------- enum class Direction { Horizontal, Vertical }; enum class Alignment { Start, End, Center, Stretch }; @@ -67,21 +64,12 @@ struct CornerRadius { return *this; } + bool operator==(const CornerRadius& other) const = default; + Point left_top; Point right_top; Point left_bottom; Point right_bottom; }; -inline bool operator==(const CornerRadius& left, const CornerRadius& right) { - return left.left_top == right.left_top && - left.left_bottom == right.left_bottom && - left.right_top == right.right_top && - left.right_bottom == right.right_bottom; -} - -inline bool operator!=(const CornerRadius& left, const CornerRadius& right) { - return !(left == right); -} - } // namespace cru::ui -- cgit v1.2.3