diff options
author | 杨宇千 <crupest@outlook.com> | 2018-12-06 21:32:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 21:32:58 +0800 |
commit | b028e74a48de181ca078ad3bf4ababf4fa146cd3 (patch) | |
tree | 5b15e3f97c67e81ad99fb531f30681300a79b5a9 /src/ui/controls/linear_layout.cpp | |
parent | f0e2b2d3763dd100a5e9d6cda566724d2b7da965 (diff) | |
parent | de5d84f64ba7673a5155aab67244fedc04753b94 (diff) | |
download | cru-b028e74a48de181ca078ad3bf4ababf4fa146cd3.tar.gz cru-b028e74a48de181ca078ad3bf4ababf4fa146cd3.tar.bz2 cru-b028e74a48de181ca078ad3bf4ababf4fa146cd3.zip |
Merge pull request #36 from crupest/tree
Enhance tree.
Diffstat (limited to 'src/ui/controls/linear_layout.cpp')
-rw-r--r-- | src/ui/controls/linear_layout.cpp | 12 |
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(); |