Skip to content

Commit

Permalink
[ServiceList] in two line mode respect ratio between single line and …
Browse files Browse the repository at this point in the history
…two line mode

Includes sanity check to avoid potential ZeroDivisionError.
  • Loading branch information
Huevos committed Nov 21, 2023
1 parent 0599c9c commit 4a7f146
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/python/Components/ServiceList.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def setItemsPerPage(self):
numberOfRows = config.usage.serviceitems_per_page.value
two_lines_val = int(config.usage.servicelist_twolines.value)
if two_lines_val == 1:
numberOfRows = numberOfRows // 2
numberOfRows = int(numberOfRows / ((self.ItemHeightTwoLineSkin / self.ItemHeightSkin)) if self.ItemHeightSkin and self.ItemHeightTwoLineSkin else 2)
itemHeight = self.ItemHeightSkin if not two_lines_val else self.ItemHeightTwoLineSkin
if numberOfRows > 0:
itemHeight = self.listHeight // numberOfRows
Expand Down

0 comments on commit 4a7f146

Please sign in to comment.