mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 19:19:03 +01:00 
			
		
		
		
	fix(tab-row): Fix extra +1 when extraWidthRemaining is a decimal
This commit is contained in:
		
							parent
							
								
									a38c091d73
								
							
						
					
					
						commit
						537ad1c1e5
					
				| @ -510,11 +510,11 @@ export default class TabRowWidget extends BasicWidget { | |||||||
|         let extraWidthRemaining = totalExtraWidthDueToFlooring; |         let extraWidthRemaining = totalExtraWidthDueToFlooring; | ||||||
| 
 | 
 | ||||||
|         for (let i = 0; i < numberOfTabs; i += 1) { |         for (let i = 0; i < numberOfTabs; i += 1) { | ||||||
|             const extraWidth = flooredClampedTargetWidth < TAB_CONTAINER_MAX_WIDTH && extraWidthRemaining > 0 ? 1 : 0; |             const extraWidth = flooredClampedTargetWidth < TAB_CONTAINER_MAX_WIDTH && extraWidthRemaining >= 1 ? 1 : 0; | ||||||
| 
 | 
 | ||||||
|             widths.push(flooredClampedTargetWidth + extraWidth); |             widths.push(flooredClampedTargetWidth + extraWidth); | ||||||
| 
 | 
 | ||||||
|             if (extraWidthRemaining > 0) { |             if (extraWidthRemaining >= 1) { | ||||||
|                 extraWidthRemaining -= 1; |                 extraWidthRemaining -= 1; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 SiriusXT
						SiriusXT