v0.8.2d: tweaked sizing on WndBag

This commit is contained in:
Evan Debenham 2020-08-29 14:59:03 -04:00
parent 8be5d67911
commit 7e9ac9d5c9

View File

@ -151,12 +151,12 @@ public class WndBag extends WndTabbed {
int windowHeight = TITLE_HEIGHT + slotHeight * nRows + SLOT_MARGIN * (nRows - 1); int windowHeight = TITLE_HEIGHT + slotHeight * nRows + SLOT_MARGIN * (nRows - 1);
if (PixelScene.landscape()){ if (PixelScene.landscape()){
while (windowHeight + 20 > PixelScene.uiCamera.height){ while (slotHeight >= 24 && (windowHeight + 20 + chrome.marginTop()) > PixelScene.uiCamera.height){
slotHeight--; slotHeight--;
windowHeight -= nRows; windowHeight -= nRows;
} }
} else { } else {
while (windowWidth > PixelScene.uiCamera.width){ while (slotWidth >= 26 && (windowWidth + chrome.marginHor()) > PixelScene.uiCamera.width){
slotWidth--; slotWidth--;
windowWidth -= nCols; windowWidth -= nCols;
} }