Skip to content

Commit

Permalink
[glass] Align Field2d border and image padding (#7214)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmheuer authored Oct 16, 2024
1 parent 59dc9ad commit 40caabe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions glass/src/lib/native/cpp/other/Field2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,12 @@ FieldFrameData FieldInfo::GetFrameData(ImVec2 min, ImVec2 max) const {
max.x -= 20;
min.y += 20;
max.y -= 20;

// also pad the image so it's the same size as the box
ffd.imageMin.x += 20;
ffd.imageMax.x -= 20;
ffd.imageMin.y += 20;
ffd.imageMax.y -= 20;
}

ffd.min = min;
Expand Down

0 comments on commit 40caabe

Please sign in to comment.