mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
UI: Fix clipping with margins.
Affected text views, like "No screenshot." in save states.
This commit is contained in:
parent
21a15e4728
commit
8d41664bb1
2 changed files with 3 additions and 4 deletions
|
@ -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…
Add table
Reference in a new issue