diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-10-11 19:30:36 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-10-11 19:30:36 +0800 |
commit | ea80856073d4896da5df78d60369b327346a0b56 (patch) | |
tree | c5bd85b508374066a66864ba1317129ac49db6fc /src/ui/host/WindowHost.cpp | |
parent | 9768b98d46982501c3b34c171aa51389b06add3b (diff) | |
download | cru-ea80856073d4896da5df78d60369b327346a0b56.tar.gz cru-ea80856073d4896da5df78d60369b327346a0b56.tar.bz2 cru-ea80856073d4896da5df78d60369b327346a0b56.zip |
Split and log debug tag.
Diffstat (limited to 'src/ui/host/WindowHost.cpp')
-rw-r--r-- | src/ui/host/WindowHost.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/ui/host/WindowHost.cpp b/src/ui/host/WindowHost.cpp index 59e383c5..88e8cc87 100644 --- a/src/ui/host/WindowHost.cpp +++ b/src/ui/host/WindowHost.cpp @@ -21,13 +21,8 @@ using platform::gui::INativeWindow; using platform::gui::IUiApplication; namespace event_names { -#ifdef CRU_DEBUG -// clang-format off -#define CRU_DEFINE_EVENT_NAME(name) constexpr const char16_t* name = CRU_MAKE_UNICODE_LITERAL(name); -// clang-format on -#else -#define CRU_DEFINE_EVENT_NAME(name) constexpr const char16_t* name = u""; -#endif +#define CRU_DEFINE_EVENT_NAME(name) \ + constexpr const char16_t* name = CRU_MAKE_UNICODE_LITERAL(name); CRU_DEFINE_EVENT_NAME(LoseFocus) CRU_DEFINE_EVENT_NAME(GainFocus) @@ -202,7 +197,8 @@ void WindowHost::RelayoutWithSize(const Size& available_size, for (auto& action : after_layout_stable_action_) action(); after_layout_event_.Raise(AfterLayoutEventArgs{}); after_layout_stable_action_.clear(); - if constexpr (debug_flags::layout) CRU_LOG_TAG_DEBUG("A relayout is finished."); + if constexpr (debug_flags::layout) + CRU_LOG_TAG_DEBUG("A relayout is finished."); } void WindowHost::Repaint() { |