File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ class nsZenCtrlTabPanel extends nsZenDOMOperatedFeature {
2828 static CARD_HEIGHT = 220 ;
2929 static MAX_VISIBLE_CARDS = 5 ;
3030 static PANEL_PADDING = 16 ;
31- static THUMBNAIL_CANVAS_HEIGHT = 300 ;
3231
3332 #isOpen = false ;
3433 #currentIndex = 0 ;
@@ -206,9 +205,12 @@ class nsZenCtrlTabPanel extends nsZenDOMOperatedFeature {
206205 this . #actualVisibleCards = Math . min ( this . #tabList. length , maxCards ) ;
207206
208207 const browserRect = gBrowser . tabbox . getBoundingClientRect ( ) ;
209- const thumbnailHeight = nsZenCtrlTabPanel . THUMBNAIL_CANVAS_HEIGHT ;
208+ // Clamp width to 300 on narrow viewports and 700 on wide viewports
210209 const thumbnailWidth = Math . round (
211- thumbnailHeight * ( browserRect . width / browserRect . height )
210+ Math . min ( Math . max ( ( browserRect . width / browserRect . height ) * 500 , 300 ) , 700 )
211+ ) ;
212+ const thumbnailHeight = Math . round (
213+ thumbnailWidth * ( browserRect . height / browserRect . width )
212214 ) ;
213215
214216 await this . #cacheThumbnailsForVisible( thumbnailWidth , thumbnailHeight ) ;
You can’t perform that action at this time.
0 commit comments