mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-24 08:39:51 +00:00
UI: Fix clipping with margins.
Affected text views, like "No screenshot." in save states.
This commit is contained in:
parent
21a15e4728
commit
8d41664bb1
@ -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()) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user