Public bug reported:
This was discovered when investigating fix for bug #1868529.
Aspect ratio is still not correct for images that are more narrow than
the container. To reproduce, create an image that has aspect ratio,
e.g., ~0.5 (e.g. width = 250 and height = 500).
Line in fileItem.js where we calculate icon width does not count the
margins (zero is used instead of actual margins):
let containerWidth = Prefs.getDesiredWidth(scaleFactor, 0);
Here is how the margins are being calculated in desktopGrid.js:
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) +
themeNode.get_horizontal_padding();
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) +
themeNode.get_vertical_padding();
** Affects: gnome-shell-extension-desktop-icons (Ubuntu)
Importance: Undecided
Status: New
** Tags: 20.04
** Description changed:
- This was discovered when investigating fox for bug 1868529.
+ This was discovered when investigating fix for bug #1868529.
Aspect ratio is still not correct for images that are more narrow than
the container. To reproduce, create an image that has aspect ratio,
e.g., ~0.5 (e.g. width = 250 and height = 500).
Line in fileItem.js where we calculate icon width does not count the
margins (zero is used instead of actual margins):
let iconWidth = Prefs.getDesiredWidth(scaleFactor, 0);
Here is how the margins are being calculated in desktopGrid.js:
- 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) +
- themeNode.get_horizontal_padding();
- 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) +
- themeNode.get_vertical_padding();
+ 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) +
+ themeNode.get_horizontal_padding();
+ 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) +
+ themeNode.get_vertical_padding();
--
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-shell-extension-desktop-icons
in Ubuntu.
https://bugs.launchpad.net/bugs/1880031
Title:
Thumbnail is stretched if its aspect ratio is less than that of the
container
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell-extension-desktop-icons/+bug/1880031/+subscriptions
--
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs