diff --git a/ext/native/ui/view.cpp b/ext/native/ui/view.cpp index 32ba78ae7..7014e4b36 100644 --- a/ext/native/ui/view.cpp +++ b/ext/native/ui/view.cpp @@ -658,9 +658,8 @@ void TextView::Draw(UIContext &dc) { clip = false; } if (clip) { - Bounds clipRect = bounds_.Expand(10); // TODO: Remove this hackery dc.Flush(); - dc.PushScissor(clipRect); + dc.PushScissor(bounds_); } // In case it's been made focusable. if (HasFocus()) { diff --git a/ext/native/ui/viewgroup.cpp b/ext/native/ui/viewgroup.cpp index 79f67a06f..11eee82f9 100644 --- a/ext/native/ui/viewgroup.cpp +++ b/ext/native/ui/viewgroup.cpp @@ -35,8 +35,8 @@ bool IsDragCaptured(int id) { } void ApplyGravity(const Bounds outer, const Margins &margins, float w, float h, int gravity, Bounds &inner) { - inner.w = w - (margins.left + margins.right); - inner.h = h - (margins.top + margins.bottom); + inner.w = w; + inner.h = h; switch (gravity & G_HORIZMASK) { case G_LEFT: inner.x = outer.x + margins.left; break;