SFT-4353: adjusted casa icon alignment in extensions menu
What changed, and why it matters
This commit is a purely cosmetic UI tweak. It adds a tiny one-pixel bottom padding to the Casa icon in the extensions menu on color-screen Passport devices so the icon lines up better visually. There is no security relevance.
No security action needed; treat as a normal UI fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change extends the Icon view class to accept optional top/bottom padding parameters and updates MenuItem to pass bottom_pad=1 only when the icon is ICON_CASA and the device is a color model (passport.IS_COLOR). It touches only display/layout code and does not alter input handling, memory safety, cryptography, authentication, or any security-sensitive logic.
Changed components
ports/stm32/boards/Passport/modules/views/icon.pyports/stm32/boards/Passport/modules/views/menu_item.pyInspect captured patch +9 / −2
diff --git a/ports/stm32/boards/Passport/modules/views/icon.py b/ports/stm32/boards/Passport/modules/views/icon.py
index fbee3bc..91392a0 100644
--- a/ports/stm32/boards/Passport/modules/views/icon.py
+++ b/ports/stm32/boards/Passport/modules/views/icon.py
@@ -7,22 +7,26 @@ import lvgl as lv
from styles import Stylize, LocalStyle
from views import View
from utils import derive_icon
+import passport
class Icon(View):
- def __init__(self, icon, color=None, opa=None):
+ def __init__(self, icon, color=None, opa=None, bottom_pad=0, top_pad=0):
from utils import derive_icon
super().__init__()
self.icon = derive_icon(icon)
self.color = color
self.opa = opa
+ self.bottom_pad = bottom_pad
+ self.top_pad = top_pad
with Stylize(self) as default:
if self.color is not None:
default.img_recolor(self.color)
if self.opa is not None:
default.opa(self.opa)
+ default.pad(bottom=self.bottom_pad, top=self.top_pad)
def set_icon(self, icon):
from utils import derive_icon
diff --git a/ports/stm32/boards/Passport/modules/views/menu_item.py b/ports/stm32/boards/Passport/modules/views/menu_item.py
index 64e4475..c7a8c89 100644
--- a/ports/stm32/boards/Passport/modules/views/menu_item.py
+++ b/ports/stm32/boards/Passport/modules/views/menu_item.py
@@ -11,6 +11,7 @@ from styles.colors import FOCUSED_LIST_ITEM_TEXT, FOCUSED_LIST_ITEM_BG, NORMAL_T
from constants import MENU_ITEM_CORNER_RADIUS
from views import View
from utils import derive_icon
+import passport
class MenuItem(View):
@@ -19,6 +20,7 @@ class MenuItem(View):
from views import Switch
super().__init__(flex_flow=lv.FLEX_FLOW.ROW)
+ self.icon_name = icon
self.icon = derive_icon(icon)
self.label = label
self.is_toggle = is_toggle
@@ -50,7 +52,8 @@ class MenuItem(View):
focus.img_recolor(FOCUSED_LIST_ITEM_TEXT)
# Icon
- self.icon_view = Icon(icon=self.icon)
+ bottom_pad = 1 if self.icon_name == 'ICON_CASA' and passport.IS_COLOR else 0
+ self.icon_view = Icon(icon=self.icon, bottom_pad=bottom_pad)
self.icon_view.set_size(21, lv.SIZE.CONTENT)
self.add_child(self.icon_view)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.