Skip to content

fix: adjust nft image loading method#399

Merged
guowei0105 merged 2 commits intoOneKeyHQ:mainfrom
guowei0105:new-boot
Dec 3, 2025
Merged

fix: adjust nft image loading method#399
guowei0105 merged 2 commits intoOneKeyHQ:mainfrom
guowei0105:new-boot

Conversation

@guowei0105
Copy link
Copy Markdown
Contributor

@guowei0105 guowei0105 commented Dec 3, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced NFT image display in the manager with rounded corners and improved rendering to eliminate visual artifacts
    • Refined image layout and alignment for better visual consistency

✏️ Tip: You can customize this high-level summary in your review settings.

@guowei0105 guowei0105 requested a review from a team as a code owner December 3, 2025 02:54
@revan-zhang
Copy link
Copy Markdown
Contributor

revan-zhang commented Dec 3, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Dec 3, 2025

Walkthrough

NFT image rendering refactored to use a clipped, rounded container. Image widget moved inside container with zoom-based positioning and center alignment. Title anchor updated to reference the container instead of the image directly.

Changes

Cohort / File(s) Summary
NFT Image Container & Layout
core/src/trezor/lvglui/scrs/nftmanager.py
Introduced nft_image_container to clip corners, apply radius, and disable scrolling/clicking. NFT image now positioned inside container with zoom level 243 and center alignment. Title alignment anchored to container for proper spacing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify container properties (clipping, radius, event bubbling) are correctly configured
  • Confirm zoom level 243 and center alignment produce intended visual result
  • Check title anchor reference and spacing calculation relative to container

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title describes image rendering adjustments (zoom, container, clipping) but omits key technical detail: container addition for corner clipping.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d6b021d and 18d68cd.

📒 Files selected for processing (1)
  • core/src/trezor/lvglui/scrs/nftmanager.py (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
core/src/trezor/lvglui/scrs/nftmanager.py (2)
core/src/trezor/lvglui/scrs/widgets/style.py (8)
  • align (12-14)
  • StyleWrapper (4-211)
  • radius (8-10)
  • clip_corner (201-203)
  • bg_color (44-46)
  • bg_opa (48-50)
  • border_width (137-139)
  • pad_all (60-62)
core/src/trezor/lvglui/lv_colors.py (1)
  • lv_colors (9-69)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Gen check
  • GitHub Check: Style check
  • GitHub Check: Defs check

@guowei0105 guowei0105 requested review from a team and somebodyLi December 3, 2025 03:03
@guowei0105 guowei0105 merged commit b6ab910 into OneKeyHQ:main Dec 3, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants