From d5ccd4a86d6226957b642ad65431d1ad8ffcc3f2 Mon Sep 17 00:00:00 2001 From: Gabriel Moreira Minossi Date: Mon, 11 Jan 2021 16:34:39 -0300 Subject: [PATCH] Rounding down divisions on panel buttons scaling --- Programs/monitor-system/api/gui/page/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Programs/monitor-system/api/gui/page/init.lua b/Programs/monitor-system/api/gui/page/init.lua index 0c43dee..9e0b8c3 100644 --- a/Programs/monitor-system/api/gui/page/init.lua +++ b/Programs/monitor-system/api/gui/page/init.lua @@ -66,15 +66,15 @@ local function drawTitle(title) local x = Constants.baseWidth local y = 1 local width = 3 * Constants.baseWidth - local height = 0.8 * Constants.baseHeight + local height = math.floor(0.8 * Constants.baseHeight) Widget.drawBaseWidget(x, y, width, height, title) end local function drawPanelSection(index, title) - local width = 0.6 * Constants.baseWidth - local height = 0.6 * Constants.baseHeight + local width = math.floor(0.6 * Constants.baseWidth) + local height = math.floor(0.6 * Constants.baseHeight) local x = (Constants.baseWidth - width) / 2 - local y = (index - 1) * Constants.baseHeight + (Constants.baseHeight - height) / 2 + local y = (index - 1) * Constants.baseHeight + math.floor((Constants.baseHeight - height) / 2) Widget.drawBaseWidget(x, y, width, height, title) end