Video-Hub-App icon indicating copy to clipboard operation
Video-Hub-App copied to clipboard

Fix: Correct column calculation for zoomed-in displays

Open Sasiprakash-UoA opened this issue 7 months ago • 1 comments

The issue I have addressed: #840

What I Did:

  • Restored the saved zoom level using webFrame.setZoomFactor(currentZoomLevel)

  • After applying zoom, forced a gallery layout refresh using computePreviewWidth() and virtualScroller.refresh() inside a setTimeout(..., 0)

  • This ensures the correct number of columns is rendered even when a zoom level like 150% is used

  • The change eliminates the issue of one column being missing on cold start due to delayed zoom application

  • Verified proper layout at both 100% and 150% zoom levels

  • Confirmed that dynamic resizing continues to work smoothly at all zoom levels

Big cheers and thanks for reviewing this! Hope it keeps the gallery looking sharp across zoom levels.

Sasiprakash-UoA avatar Jun 18 '25 06:06 Sasiprakash-UoA

Thank you so much! This bug was causing a visually unpleasant experience 😅

There is some code you have that's from another PR -- #896 -- but I'll make sure to merge that one in first to make the file changes reflect the PR-specific changes 👍 (no need for you to do anything about this)

I really appreciate all the additions you're making to Video Hub App ❤️ 😊 🙇

whyboris avatar Jun 18 '25 13:06 whyboris