aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/linear_layout.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-25 22:57:07 +0800
committercrupest <crupest@outlook.com>2018-11-25 22:57:07 +0800
commit22322daf6f51da53740ff95ef2eaceed9a6efcae (patch)
tree06b17b482e2e15cb0692d05b279c61cbd6923b4d /src/ui/controls/linear_layout.cpp
parent5391e781e4682731721c841462904809bc618870 (diff)
downloadcru-22322daf6f51da53740ff95ef2eaceed9a6efcae.tar.gz
cru-22322daf6f51da53740ff95ef2eaceed9a6efcae.tar.bz2
cru-22322daf6f51da53740ff95ef2eaceed9a6efcae.zip
Develop basic functions of ScrollControl.
Diffstat (limited to 'src/ui/controls/linear_layout.cpp')
-rw-r--r--src/ui/controls/linear_layout.cpp12
1 files changed, 2 insertions, 10 deletions
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 <algorithm>
+#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;