mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Merge pull request #3328 from mikiher/aspect-ratio-card-width
Update series and collection width to account for book aspect ratio
This commit is contained in:
		
						commit
						519a1b0eaf
					
				| @ -201,23 +201,6 @@ export default { | |||||||
|       // This method returns immediately without waiting for the DOM to update |       // This method returns immediately without waiting for the DOM to update | ||||||
|       return this.coverWidth |       return this.coverWidth | ||||||
|     }, |     }, | ||||||
|     /* |  | ||||||
|     cardHeight() { |  | ||||||
|       // This method returns immediately without waiting for the DOM to update |  | ||||||
|       return this.coverHeight + this.detailsHeight |  | ||||||
|     }, |  | ||||||
|     detailsHeight() { |  | ||||||
|       if (!this.isAlternativeBookshelfView) return 0 |  | ||||||
|       const lineHeight = 1.5 |  | ||||||
|       const remSize = 16 |  | ||||||
|       const baseHeight = this.sizeMultiplier * lineHeight * remSize |  | ||||||
|       const titleHeight = 0.9 * baseHeight |  | ||||||
|       const line2Height = 0.8 * baseHeight |  | ||||||
|       const line3Height = this.displaySortLine ? 0.8 * baseHeight : 0 |  | ||||||
|       const marginHeight = 8 * 2 * this.sizeMultiplier // py-2 |  | ||||||
|       return titleHeight + line2Height + line3Height + marginHeight |  | ||||||
|     }, |  | ||||||
|     */ |  | ||||||
|     sizeMultiplier() { |     sizeMultiplier() { | ||||||
|       return this.store.getters['user/getSizeMultiplier'] |       return this.store.getters['user/getSizeMultiplier'] | ||||||
|     }, |     }, | ||||||
|  | |||||||
| @ -57,23 +57,11 @@ export default { | |||||||
|       return this.store.getters['libraries/getBookCoverAspectRatio'] |       return this.store.getters['libraries/getBookCoverAspectRatio'] | ||||||
|     }, |     }, | ||||||
|     cardWidth() { |     cardWidth() { | ||||||
|       return this.width || this.coverHeight * 2 |       return this.width || (this.coverHeight / this.bookCoverAspectRatio) * 2 | ||||||
|     }, |     }, | ||||||
|     coverHeight() { |     coverHeight() { | ||||||
|       return this.height * this.sizeMultiplier |       return this.height * this.sizeMultiplier | ||||||
|     }, |     }, | ||||||
|     cardHeight() { |  | ||||||
|       return this.coverHeight + this.bottomTextHeight |  | ||||||
|     }, |  | ||||||
|     bottomTextHeight() { |  | ||||||
|       if (!this.isAlternativeBookshelfView) return 0 // bottom text appears on top of the divider |  | ||||||
|       const lineHeight = 1.5 |  | ||||||
|       const remSize = 16 |  | ||||||
|       const baseHeight = this.sizeMultiplier * lineHeight * remSize |  | ||||||
|       const titleHeight = this.labelFontSize * baseHeight |  | ||||||
|       const paddingHeight = 4 * 2 * this.sizeMultiplier // py-1 |  | ||||||
|       return titleHeight + paddingHeight |  | ||||||
|     }, |  | ||||||
|     labelFontSize() { |     labelFontSize() { | ||||||
|       if (this.width < 160) return 0.75 |       if (this.width < 160) return 0.75 | ||||||
|       return 0.9 |       return 0.9 | ||||||
|  | |||||||
| @ -65,7 +65,7 @@ export default { | |||||||
|       return this.store.getters['libraries/getBookCoverAspectRatio'] |       return this.store.getters['libraries/getBookCoverAspectRatio'] | ||||||
|     }, |     }, | ||||||
|     cardWidth() { |     cardWidth() { | ||||||
|       return this.width || this.coverHeight * 2 |       return this.width || (this.coverHeight / this.bookCoverAspectRatio) * 2 | ||||||
|     }, |     }, | ||||||
|     coverHeight() { |     coverHeight() { | ||||||
|       return this.height * this.sizeMultiplier |       return this.height * this.sizeMultiplier | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user