aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/linear_layout.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-12-06 05:44:38 +0800
committercrupest <crupest@outlook.com>2018-12-06 05:44:38 +0800
commit81fd0725d020e9f302c0d40fd5a5700d3dc871aa (patch)
tree1a99936949271641fbdfa3b4fb7ea448344164f7 /src/ui/controls/linear_layout.cpp
parentf0e2b2d3763dd100a5e9d6cda566724d2b7da965 (diff)
downloadcru-81fd0725d020e9f302c0d40fd5a5700d3dc871aa.tar.gz
cru-81fd0725d020e9f302c0d40fd5a5700d3dc871aa.tar.bz2
cru-81fd0725d020e9f302c0d40fd5a5700d3dc871aa.zip
Done.
Diffstat (limited to 'src/ui/controls/linear_layout.cpp')
-rw-r--r--src/ui/controls/linear_layout.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/controls/linear_layout.cpp b/src/ui/controls/linear_layout.cpp
index 2b8f3e43..d3fdc9b5 100644
--- a/src/ui/controls/linear_layout.cpp
+++ b/src/ui/controls/linear_layout.cpp
@@ -7,7 +7,7 @@
namespace cru::ui::controls
{
LinearLayout::LinearLayout(const Orientation orientation)
- : Control(true), orientation_(orientation)
+ : orientation_(orientation)
{
}
@@ -27,7 +27,7 @@ namespace cru::ui::controls
// First measure Content and Exactly and count Stretch.
if (orientation_ == Orientation::Horizontal)
- for(auto control: GetChildren())
+ for(auto control: GetInternalChildren())
{
const auto mode = control->GetLayoutParams()->width.mode;
if (mode == MeasureMode::Content || mode == MeasureMode::Exactly)
@@ -42,7 +42,7 @@ namespace cru::ui::controls
stretch_control_list.push_back(control);
}
else
- for(auto control: GetChildren())
+ for(auto control: GetInternalChildren())
{
const auto mode = control->GetLayoutParams()->height.mode;
if (mode == MeasureMode::Content || mode == MeasureMode::Exactly)
@@ -82,7 +82,7 @@ namespace cru::ui::controls
if (orientation_ == Orientation::Horizontal)
{
- for (auto control : GetChildren())
+ for (auto control : GetInternalChildren())
{
if (control->GetLayoutParams()->height.mode == MeasureMode::Stretch)
{
@@ -93,7 +93,7 @@ namespace cru::ui::controls
}
else
{
- for (auto control : GetChildren())
+ for (auto control : GetInternalChildren())
{
if (control->GetLayoutParams()->width.mode == MeasureMode::Stretch)
{
@@ -110,7 +110,7 @@ namespace cru::ui::controls
void LinearLayout::OnLayoutContent(const Rect& rect, const AdditionalLayoutInfo& additional_info)
{
float current_main_side_anchor = 0;
- for(auto control: GetChildren())
+ for(auto control: GetInternalChildren())
{
const auto layout_params = control->GetLayoutParams();
const auto size = control->GetDesiredSize();