Menu: Arrange 3 x 2 and 2 x 2 (#442)

* Arrange 3 x 3 and 2 x 2

* typo
This commit is contained in:
Alfredo Monclus authored and GitHub committed 2022-01-17 01:12:54 -05:00
1 parent 8775221b5f
commit 86fc0f9988
1 file changed
+8
+8
View File
@@ -43,6 +43,14 @@ class MenuPanel(ScreenPanel):
if not self.evaluate_enable(item[key]['enable']):
continue
if columns == 4:
if length <= 4:
# Arrange 2 x 2
columns = 2
elif length > 4 and length <= 6:
# Arrange 3 x 2
columns = 3
col = i % columns
row = int(i/columns)
width = 1