summaryrefslogtreecommitdiff
path: root/src/ui/paint.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-27 11:59:28 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-27 11:59:28 +0300
commit9a7aa34e63132edb5906914ff99b861e64ee9099 (patch)
tree327e275b7f4fd6eb05150f7c03a87a72794d22a0 /src/ui/paint.c
parent170209cf926e2f714d507fefaa6b30fd245811ad (diff)
Refactor: Added a proper Root object
`Root` encapsulates the root widget and the associated UI state.
Diffstat (limited to 'src/ui/paint.c')
-rw-r--r--src/ui/paint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/paint.c b/src/ui/paint.c
index 857bf20c..02914489 100644
--- a/src/ui/paint.c
+++ b/src/ui/paint.c
@@ -87,8 +87,8 @@ void unsetClip_Paint(iPaint *d) {
87void drawRect_Paint(const iPaint *d, iRect rect, int color) { 87void drawRect_Paint(const iPaint *d, iRect rect, int color) {
88 iInt2 br = bottomRight_Rect(rect); 88 iInt2 br = bottomRight_Rect(rect);
89 /* Keep the right/bottom edge visible in the window. */ 89 /* Keep the right/bottom edge visible in the window. */
90 if (br.x == d->dst->root->rect.size.x) br.x--; 90 if (br.x == d->dst->root.widget->rect.size.x) br.x--;
91 if (br.y == d->dst->root->rect.size.y) br.y--; 91 if (br.y == d->dst->root.widget->rect.size.y) br.y--;
92 const SDL_Point edges[] = { 92 const SDL_Point edges[] = {
93 { left_Rect(rect), top_Rect(rect) }, 93 { left_Rect(rect), top_Rect(rect) },
94 { br.x, top_Rect(rect) }, 94 { br.x, top_Rect(rect) },