menu/main_menu: Better RTL support

This commit is contained in:
Jordan Ruthe
2021-01-08 19:02:49 -05:00
parent ab7cffe4d6
commit a087ecfa30
3 changed files with 5 additions and 10 deletions

View File

@@ -42,14 +42,12 @@ class MenuPanel(ScreenPanel):
if not self.evaluate_enable(item[key]['enable']):
continue
col = i % columns if self._screen.lang_ltr == True else (columns - (i % columns) - 1)
col = i % columns
row = int(i/columns)
width = 1
if expandLast == True and i+1 == l and l%2 == 1:
width = 2
if not self._screen.lang_ltr:
col = col - 1
self.grid.attach(self.labels[key], col, row, width, 1)
i += 1