From 145bc90eae3afae81eed6ede82fc1bb016922f12 Mon Sep 17 00:00:00 2001
From: Gabriel Tofvesson <gabriel@tofvesson.se>
Date: Sat, 12 Oct 2024 00:48:31 +0200
Subject: [PATCH] Redesign simple item info

---
 itemcontroller.lua | 44 +++++++++++++++++++++++++++++++++++++-------
 1 file changed, 37 insertions(+), 7 deletions(-)

diff --git a/itemcontroller.lua b/itemcontroller.lua
index 9e492ba..3011354 100644
--- a/itemcontroller.lua
+++ b/itemcontroller.lua
@@ -331,11 +331,36 @@ local PAGES = {
       bgColor = colors.gray
     }
 
-    local itemCount = Text:new{
-      text = "Count: "..tostring(group:getItemCount()),
-    }
-    local itemSlots = Text:new{
-      text = "Slots: "..tostring(group:getStackCount())
+    local simpleDetailsList = List:new{
+      [Orientation:getId()] = Orientation.HORIZONTAL,
+      [Children:getId()] = {
+        Padding:new{
+          top = 0,
+          left = 1,
+          right = 1,
+          bottom = 0,
+          element = List:new{
+            [Orientation:getId()] = Orientation.VERTICAL,
+            [Children:getId()] = {
+              Text:new{ text = "Count" },
+              Text:new{ text = tostring(group:getItemCount()) }
+            }
+          }
+        },
+        Padding:new{
+          top = 0,
+          left = 1,
+          right = 1,
+          bottom = 0,
+          element = List:new{
+            [Orientation:getId()] = Orientation.VERTICAL,
+            [Children:getId()] = {
+              Text:new{ text = "Slot" },
+              Text:new{ text = tostring(group:getStackCount()) }
+            }
+          }
+        }
+      }
     }
 
     local damage = group:getDamage()
@@ -353,8 +378,13 @@ local PAGES = {
     local infoElements = List:new{
       [Children:getId()] = {
         paddedTitle,
-        itemCount,
-        itemSlots,
+        Padding:new{
+          top = 0,
+          bottom = 1,
+          left = 0,
+          right = 0,
+          element = simpleDetailsList
+        },
         damageBar
       },
       [Orientation:getId()] = Orientation.VERTICAL,