aboutsummaryrefslogtreecommitdiff
path: root/src/ui/render/RenderObject.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-29 00:31:21 +0800
committercrupest <crupest@outlook.com>2020-06-29 00:31:21 +0800
commit5c3dae62b9218dbd2493ff6390db062013ca4bdc (patch)
tree3425a9efa118eaf89627e6903cecb50a3daedb1d /src/ui/render/RenderObject.cpp
parent6b5aff7b7e50fae15cb010b340099163725f664c (diff)
downloadcru-5c3dae62b9218dbd2493ff6390db062013ca4bdc.tar.gz
cru-5c3dae62b9218dbd2493ff6390db062013ca4bdc.tar.bz2
cru-5c3dae62b9218dbd2493ff6390db062013ca4bdc.zip
...
Diffstat (limited to 'src/ui/render/RenderObject.cpp')
-rw-r--r--src/ui/render/RenderObject.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/ui/render/RenderObject.cpp b/src/ui/render/RenderObject.cpp
index d9977f2a..66b62e6e 100644
--- a/src/ui/render/RenderObject.cpp
+++ b/src/ui/render/RenderObject.cpp
@@ -151,9 +151,9 @@ Size RenderObject::OnMeasureCore(const MeasureRequirement& requirement,
if (!requirement.max.width.IsNotSpecified()) {
const auto max_width = requirement.max.width.GetLengthOrMax();
if (coerced_space_size.width > max_width) {
- log::Warn(
- "RenderObject: During measure, horizontal length of padding and "
- "margin is bigger than required max length.");
+ log::TagWarn(log_tag,
+ "(Measure) Horizontal length of padding and margin is "
+ "bigger than required max length.");
coerced_space_size.width = max_width;
}
content_requirement.max.width = max_width - coerced_space_size.width;
@@ -167,9 +167,9 @@ Size RenderObject::OnMeasureCore(const MeasureRequirement& requirement,
if (!requirement.max.height.IsNotSpecified()) {
const auto max_height = requirement.max.height.GetLengthOrMax();
if (coerced_space_size.height > max_height) {
- log::Warn(
- "RenderObject: During measure, vertical length of padding and "
- "margin is bigger than required max length.");
+ log::TagWarn(log_tag,
+ "(Measure) Vertical length of padding and margin is bigger "
+ "than required max length.");
coerced_space_size.height = max_height;
}
content_requirement.max.height = max_height - coerced_space_size.height;
@@ -198,15 +198,9 @@ void RenderObject::OnLayoutCore() {
auto content_size = total_size - space_size;
if (content_size.width < 0) {
- log::Warn(
- "RenderObject: During layout, horizontal length of padding and margin "
- "is bigger than available length.");
content_size.width = 0;
}
if (content_size.height < 0) {
- log::Warn(
- "RenderObject: During layout, vertical length of padding and margin "
- "is bigger than available length.");
content_size.height = 0;
}