-
-
Notifications
You must be signed in to change notification settings - Fork 82
Make QR code in PairingCodeContentView adaptive for different screen sizes #4010
Copy link
Copy link
Closed
Labels
EnhancementNew feature or requestNew feature or request
Description
Problem
The QR code in PairingCodeContentView uses a fixed size (275x275 dp) from AppSizeValue.qrCodeSize. Since this view is in commonMain and will be displayed on phones, iPads, and desktops with varying screen sizes and aspect ratios, the fixed size doesn't adapt well — it can be too large on small screens or waste space on large ones.
Additionally, the Verified_user icon should use a green success color to better convey its security meaning.
Solution
- Replace fixed
qrCodeSizewith adaptive sizing usingBoxWithConstraints - QR code size adapts based on available space (
minOf(maxWidth, maxHeight)), clamped between 120dp and 400dp - QR bitmap generated at fixed 512x512 resolution (QR codes scale well)
- Layout prioritizes showing all fixed content (title, instructions, security info, expiry) with QR code filling remaining space
- Use
ThemeExt.success.onContainerfor the Verified_user icon color - Remove unused
qrCodeSizefield fromAppSizeValueandDesktopAppSizeValue
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
EnhancementNew feature or requestNew feature or request