From 93f78aad60346d5a4369074e99b743be67ebcbbe Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sun, 24 Mar 2019 22:53:22 +0300 Subject: [PATCH] Avoid menu button texture vertical cutoff --- apps/openmw/mwgui/mainmenu.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwgui/mainmenu.cpp b/apps/openmw/mwgui/mainmenu.cpp index 8c06859e4..2c2bd84df 100644 --- a/apps/openmw/mwgui/mainmenu.cpp +++ b/apps/openmw/mwgui/mainmenu.cpp @@ -287,11 +287,10 @@ namespace MWGui MyGUI::IntSize requested = button->getRequestedSize(); + button->setImageCoord(MyGUI::IntCoord(0, 0, requested.width, requested.height)); // Trim off some of the excessive padding // TODO: perhaps do this within ImageButton? - int trim = 8; - button->setImageCoord(MyGUI::IntCoord(0, trim, requested.width, requested.height-trim)); - int height = requested.height-trim*2; + int height = requested.height-16; button->setImageTile(MyGUI::IntSize(requested.width, height)); button->setCoord((maxwidth-requested.width) / 2, curH, requested.width, height); curH += height;