ui: fix icon vertical positioning using width instead of height (#36542)

fix icon vertical positioning using width instead of height
pull/36553/head
Dean Lee 5 days ago committed by GitHub
parent 2cc4885a2e
commit 137d4b89b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      system/ui/widgets/list_view.py

@ -354,7 +354,7 @@ class ListItem(Widget):
if self.title: if self.title:
# Draw icon if present # Draw icon if present
if self.icon: if self.icon:
rl.draw_texture(self._icon_texture, int(content_x), int(self._rect.y + (ITEM_BASE_HEIGHT - self._icon_texture.width) // 2), rl.WHITE) rl.draw_texture(self._icon_texture, int(content_x), int(self._rect.y + (ITEM_BASE_HEIGHT - self._icon_texture.height) // 2), rl.WHITE)
text_x += ICON_SIZE + ITEM_PADDING text_x += ICON_SIZE + ITEM_PADDING
# Draw main text # Draw main text

Loading…
Cancel
Save