Skip to content

General: Fix thumbnails not centered

Rastersoft requested to merge fix_too_wide_thumbnails into master

In the last version of Ubuntu, when a thumbnail has an aspect ratio of about 2.0 or greater, it is shown uncentered. This is because the container stylesheet defines a 1px margin, a 1px border and a 4px padding. This means that the available space for the thumbnail is, in fact, 12 pixels smaller in horizontal than expected, so, when the thumbnail has an aspect ratio that makes it fill the whole container horizontally, it is too big and "overflows" to the right.

This patch gets the container style and calculates how many pixels have to be added to the internal minimum size of each grid element to ensure that the icons and thumbnails will fit fine.

Fixes #130 (closed)

Edited by Rastersoft

Merge request reports