From 96a08b33937082769bc69739cfe9cb78a0eebb34 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sun, 30 Aug 2015 12:58:06 +0200 Subject: [PATCH] Quick workaround for rendering bug caused by layout bugs.. --- ui/view.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/view.cpp b/ui/view.cpp index 7a38d9acf1..4b2df42b4c 100644 --- a/ui/view.cpp +++ b/ui/view.cpp @@ -617,6 +617,11 @@ void TextView::Draw(UIContext &dc) { bool clip = false; if (w > bounds_.w || h > bounds_.h) clip = true; + if (bounds_.w < 0 || bounds_.h < 0) { + // We have a layout but, but try not to screw up rendering. + // TODO: Fix properly. + clip = false; + } if (clip) { Bounds clipRect = bounds_.Expand(10); // TODO: Remove this hackery dc.Flush();