From 22322daf6f51da53740ff95ef2eaceed9a6efcae Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 25 Nov 2018 22:57:07 +0800 Subject: Develop basic functions of ScrollControl. --- src/ui/controls/linear_layout.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/ui/controls/linear_layout.cpp') diff --git a/src/ui/controls/linear_layout.cpp b/src/ui/controls/linear_layout.cpp index 3789b305..8fb91513 100644 --- a/src/ui/controls/linear_layout.cpp +++ b/src/ui/controls/linear_layout.cpp @@ -2,6 +2,8 @@ #include +#include "math_util.hpp" + namespace cru::ui::controls { LinearLayout::LinearLayout(const Orientation orientation) @@ -10,16 +12,6 @@ namespace cru::ui::controls } - inline float AtLeast0(const float value) - { - return value < 0 ? 0 : value; - } - - inline Size AtLeast0(const Size& size) - { - return Size(AtLeast0(size.width), AtLeast0(size.height)); - } - StringView LinearLayout::GetControlType() const { return control_type; -- cgit v1.2.3