aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ui/control.cpp1
-rw-r--r--src/ui/controls/text_control.cpp3
-rw-r--r--src/ui/window.cpp2
3 files changed, 2 insertions, 4 deletions
diff --git a/src/ui/control.cpp b/src/ui/control.cpp
index 4acdd8f1..a75cab37 100644
--- a/src/ui/control.cpp
+++ b/src/ui/control.cpp
@@ -394,7 +394,6 @@ namespace cru {
if (GetWindow()->GetDebugDrawControlBorder())
{
auto brush = Application::GetInstance()->GetDebugBorderBrush();
- const auto size = GetSize();
device_context->DrawRectangle(Convert(GetRect(RectRange::Margin)), brush.Get());
}
#endif
diff --git a/src/ui/controls/text_control.cpp b/src/ui/controls/text_control.cpp
index da0113f3..ee5b253d 100644
--- a/src/ui/controls/text_control.cpp
+++ b/src/ui/controls/text_control.cpp
@@ -229,8 +229,7 @@ namespace cru::ui::controls
void TextControl::OnTextChangedCore(const String& old_text, const String& new_text)
{
RecreateTextLayout();
- if (const auto window = GetWindow())
- window->Relayout();
+ InvalidateLayout();
Repaint();
}
diff --git a/src/ui/window.cpp b/src/ui/window.cpp
index 9edbd398..2bebd7d4 100644
--- a/src/ui/window.cpp
+++ b/src/ui/window.cpp
@@ -501,7 +501,7 @@ namespace cru
void Window::OnResizeInternal(const int new_width, const int new_height) {
render_target_->ResizeBuffer(new_width, new_height);
if (!(new_width == 0 && new_height == 0))
- Relayout();
+ InvalidateLayout();
}
void Window::OnSetFocusInternal()