summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-09-19 07:20:03 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-09-19 07:20:03 +0300
commit68508e54e5707d6ab69cabf8413d58cd89531a38 (patch)
tree954df0eaa8fa302215555b0ac7ba8949bf591dd4 /src/ui
parentb149fb3ae65af6f58fc6e7fb4f569ab534a32759 (diff)
Widget: Scrolling tall widgets in vertical split
Root's safe rect was not using the right origin coordinates. IssueID #337
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/root.c2
-rw-r--r--src/ui/widget.c1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/ui/root.c b/src/ui/root.c
index b00fab28..6ea5f521 100644
--- a/src/ui/root.c
+++ b/src/ui/root.c
@@ -1515,7 +1515,7 @@ iRect rect_Root(const iRoot *d) {
1515} 1515}
1516 1516
1517iRect safeRect_Root(const iRoot *d) { 1517iRect safeRect_Root(const iRoot *d) {
1518 iRect rect = { zero_I2(), size_Root(d) }; 1518 iRect rect = rect_Root(d);
1519#if defined (iPlatformAppleMobile) 1519#if defined (iPlatformAppleMobile)
1520 float left, top, right, bottom; 1520 float left, top, right, bottom;
1521 safeAreaInsets_iOS(&left, &top, &right, &bottom); 1521 safeAreaInsets_iOS(&left, &top, &right, &bottom);
diff --git a/src/ui/widget.c b/src/ui/widget.c
index 95a39470..9ec70d07 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -1086,7 +1086,6 @@ iBool dispatchEvent_Widget(iWidget *d, const SDL_Event *ev) {
1086 1086
1087iBool scrollOverflow_Widget(iWidget *d, int delta) { 1087iBool scrollOverflow_Widget(iWidget *d, int delta) {
1088 iRect bounds = boundsWithoutVisualOffset_Widget(d); 1088 iRect bounds = boundsWithoutVisualOffset_Widget(d);
1089// const iInt2 rootSize = size_Root(d->root);
1090 const iRect winRect = adjusted_Rect(safeRect_Root(d->root), 1089 const iRect winRect = adjusted_Rect(safeRect_Root(d->root),
1091 zero_I2(), 1090 zero_I2(),
1092 init_I2(0, -get_Window()->keyboardHeight)); 1091 init_I2(0, -get_Window()->keyboardHeight));