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 2022-01-17 03:12:54 -03:00 committed by GitHub
parent 8775221b5f
commit 86fc0f9988
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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