aboutsummaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-09-08 22:24:28 +0800
committer杨宇千 <crupest@outlook.com>2019-09-08 22:24:28 +0800
commita8ba16ddab3291e59a33b36405462094f8cdf5bc (patch)
treeaa849cdc1f9b4f7a0aa150f562b2e618c63ecceb /src/ui
parent8b9a306d6f24dbc08aeee16b115260406e79126d (diff)
downloadcru-a8ba16ddab3291e59a33b36405462094f8cdf5bc.tar.gz
cru-a8ba16ddab3291e59a33b36405462094f8cdf5bc.tar.bz2
cru-a8ba16ddab3291e59a33b36405462094f8cdf5bc.zip
...
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/CMakeLists.txt2
-rw-r--r--src/ui/render/border_render_object.cpp10
-rw-r--r--src/ui/render/flex_layout_render_object.cpp1
-rw-r--r--src/ui/render/render_object.cpp10
4 files changed, 11 insertions, 12 deletions
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt
index 3186b0f5..ac69c644 100644
--- a/src/ui/CMakeLists.txt
+++ b/src/ui/CMakeLists.txt
@@ -1,4 +1,4 @@
-file(GLOB CRU_UI_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/ui)
+set(CRU_UI_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/ui)
add_library(cru_ui STATIC
routed_event_dispatch.hpp
diff --git a/src/ui/render/border_render_object.cpp b/src/ui/render/border_render_object.cpp
index 4b61e511..20bc2a50 100644
--- a/src/ui/render/border_render_object.cpp
+++ b/src/ui/render/border_render_object.cpp
@@ -1,6 +1,6 @@
#include "cru/ui/render/border_render_object.hpp"
-#include "cru/platform/debug.hpp"
+#include "cru/common/logger.hpp"
#include "cru/platform/graph/geometry.hpp"
#include "cru/platform/graph/graph_factory.hpp"
#include "cru/platform/graph/util/painter_util.hpp"
@@ -75,13 +75,13 @@ void BorderRenderObject::OnMeasureCore(const Size& available_size) {
auto coerced_margin_border_padding_size = margin_border_padding_size;
if (coerced_margin_border_padding_size.width > available_size.width) {
- platform::DebugMessage(
+ log::Warn(
L"Measure: horizontal length of padding, border and margin is bigger "
L"than available length.");
coerced_margin_border_padding_size.width = available_size.width;
}
if (coerced_margin_border_padding_size.height > available_size.height) {
- platform::DebugMessage(
+ log::Warn(
L"Measure: vertical length of padding, border and margin is bigger "
L"than available length.");
coerced_margin_border_padding_size.height = available_size.height;
@@ -113,13 +113,13 @@ void BorderRenderObject::OnLayoutCore(const Rect& rect) {
auto coerced_content_available_size = content_available_size;
if (coerced_content_available_size.width < 0) {
- platform::DebugMessage(
+ log::Warn(
L"Layout: horizontal length of padding, border and margin is bigger "
L"than available length.");
coerced_content_available_size.width = 0;
}
if (coerced_content_available_size.height < 0) {
- platform::DebugMessage(
+ log::Warn(
L"Layout: vertical length of padding, border and margin is bigger "
L"than available length.");
coerced_content_available_size.height = 0;
diff --git a/src/ui/render/flex_layout_render_object.cpp b/src/ui/render/flex_layout_render_object.cpp
index 5e313e49..c4bdd874 100644
--- a/src/ui/render/flex_layout_render_object.cpp
+++ b/src/ui/render/flex_layout_render_object.cpp
@@ -1,6 +1,5 @@
#include "cru/ui/render/flex_layout_render_object.hpp"
-#include "cru/platform/debug.hpp"
#include "cru/platform/graph/util/painter_util.hpp"
#include <algorithm>
diff --git a/src/ui/render/render_object.cpp b/src/ui/render/render_object.cpp
index 3cb7e4df..a083403b 100644
--- a/src/ui/render/render_object.cpp
+++ b/src/ui/render/render_object.cpp
@@ -1,6 +1,6 @@
#include "cru/ui/render/render_object.hpp"
-#include "cru/platform/debug.hpp"
+#include "cru/common/logger.hpp"
#include <algorithm>
#include <cassert>
@@ -54,13 +54,13 @@ void RenderObject::OnMeasureCore(const Size& available_size) {
auto coerced_margin_padding_size = margin_padding_size;
if (coerced_margin_padding_size.width > available_size.width) {
- platform::DebugMessage(
+ log::Warn(
L"Measure: horizontal length of padding and margin is bigger than "
L"available length.");
coerced_margin_padding_size.width = available_size.width;
}
if (coerced_margin_padding_size.height > available_size.height) {
- platform::DebugMessage(
+ log::Warn(
L"Measure: vertical length of padding and margin is bigger than "
L"available length.");
coerced_margin_padding_size.height = available_size.height;
@@ -82,13 +82,13 @@ void RenderObject::OnLayoutCore(const Rect& rect) {
auto coerced_content_available_size = content_available_size;
if (coerced_content_available_size.width < 0) {
- platform::DebugMessage(
+ log::Warn(
L"Layout: horizontal length of padding and margin is bigger than "
L"available length.");
coerced_content_available_size.width = 0;
}
if (coerced_content_available_size.height < 0) {
- platform::DebugMessage(
+ log::Warn(
L"Layout: vertical length of padding and margin is bigger than "
L"available length.");
coerced_content_available_size.height = 0;