It is much better with the fix. We don't count margins, so the aspect
ratio is still not valid for narrow images.

Line in fileItem.js

let width = Prefs.getDesiredWidth(scaleFactor, 0)

was also erroneous, because margins are not 0 (at least, with default

Here is how the margins are being calculated:

        this._extra_width =  themeNode.get_margin(St.Side.LEFT) +
                             themeNode.get_margin(St.Side.RIGHT) +
                             themeNode.get_border_width(St.Side.LEFT) +
                             themeNode.get_border_width(St.Side.RIGHT) +
        this._extra_height = themeNode.get_margin(St.Side.TOP) +
                             themeNode.get_margin(St.Side.BOTTOM) +
                             themeNode.get_border_width(St.Side.TOP) +
                             themeNode.get_border_width(St.Side.BOTTOM) +

(they are used in Prefs.getDesiredWidth and Prefs.getDesiredHeight

Aspect ratio is still not correct for narrow images. To reproduce,
create an image that has aspect ratio ~0.5 (e.g. width = 250 and height
= 500).

You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

  Stretched image previews on desktop

To manage notifications about this bug go to:

ubuntu-bugs mailing list

Reply via email to