diff options
author | crupest <crupest@outlook.com> | 2020-06-29 00:31:21 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-29 00:31:21 +0800 |
commit | 5c3dae62b9218dbd2493ff6390db062013ca4bdc (patch) | |
tree | 3425a9efa118eaf89627e6903cecb50a3daedb1d /src/ui/render/BorderRenderObject.cpp | |
parent | 6b5aff7b7e50fae15cb010b340099163725f664c (diff) | |
download | cru-5c3dae62b9218dbd2493ff6390db062013ca4bdc.tar.gz cru-5c3dae62b9218dbd2493ff6390db062013ca4bdc.tar.bz2 cru-5c3dae62b9218dbd2493ff6390db062013ca4bdc.zip |
...
Diffstat (limited to 'src/ui/render/BorderRenderObject.cpp')
-rw-r--r-- | src/ui/render/BorderRenderObject.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/ui/render/BorderRenderObject.cpp b/src/ui/render/BorderRenderObject.cpp index 6513c4c4..f2e3eb9b 100644 --- a/src/ui/render/BorderRenderObject.cpp +++ b/src/ui/render/BorderRenderObject.cpp @@ -57,7 +57,7 @@ void BorderRenderObject::OnDrawCore(platform::graph::IPainter* painter) { background_brush_.get()); if (is_border_enabled_) { if (border_brush_ == nullptr) { - log::Warn("Border is enabled but brush is null"); + log::TagWarn(log_tag, "Border is enabled but border brush is null."); } else { painter->FillGeometry(geometry_.get(), border_brush_.get()); } @@ -93,9 +93,9 @@ Size BorderRenderObject::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( - "BorderRenderObject: During measure, horizontal length of padding, " - "border and margin is bigger than required max length."); + log::TagWarn(log_tag, + "(Measure) Horizontal length of padding, border and margin " + "is bigger than required max length."); coerced_space_size.width = max_width; } content_requirement.max.width = max_width - coerced_space_size.width; @@ -109,9 +109,9 @@ Size BorderRenderObject::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( - "BorderRenderObject: During measure, vertical length of padding, " - "border and margin is bigger than required max length."); + log::TagWarn(log_tag, + "(Measure) Vertical length of padding, border and margin is " + "bigger than required max length."); coerced_space_size.height = max_height; } content_requirement.max.height = max_height - coerced_space_size.height; @@ -149,15 +149,9 @@ void BorderRenderObject::OnLayoutCore() { auto content_size = size - space_size; if (content_size.width < 0) { - log::Warn( - "BorderRenderObject: During layout, horizontal length of padding, " - "border and margin is bigger than available length."); content_size.width = 0; } if (content_size.height < 0) { - log::Warn( - "BorderRenderObject: During layout, vertical length of padding, " - "border and margin is bigger than available length."); content_size.height = 0; } |