From bb87a709be9119e23a4d1ae1a593973d97fca488 Mon Sep 17 00:00:00 2001 From: StapleButter Date: Wed, 8 Nov 2017 02:02:15 +0100 Subject: [PATCH] cooler screen positioning in horizontal mode --- src/libui_sdl/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp index 5023dacf..98613665 100644 --- a/src/libui_sdl/main.cpp +++ b/src/libui_sdl/main.cpp @@ -439,7 +439,7 @@ horizontal = true; // TEST TopScreenRect.Height = heightreq; } TopScreenRect.X = startX; - TopScreenRect.Y = (height - TopScreenRect.Height) / 2; + TopScreenRect.Y = ((height - heightreq) / 2) + (heightreq - TopScreenRect.Height); BottomScreenRect.X = TopScreenRect.X + TopScreenRect.Width + ScreenGap; @@ -453,7 +453,7 @@ horizontal = true; // TEST BottomScreenRect.Width = width - TopScreenRect.Width; BottomScreenRect.Height = heightreq; } - BottomScreenRect.Y = (height - BottomScreenRect.Height) / 2; + BottomScreenRect.Y = ((height - heightreq) / 2) + (heightreq - BottomScreenRect.Height); } else {