Quick workaround for rendering bug caused by layout bugs..

This commit is contained in:
Henrik Rydgard committed 2015-08-30 12:58:06 +02:00
1 parent a75c4d283d
commit 96a08b3393
1 file changed
+5
+5
View File
@@ -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();