Bug 463892 - Enhancement request: scale, rather than crop images in timeline view
Summary: Enhancement request: scale, rather than crop images in timeline view
Status: RESOLVED FIXED
Alias: None
Product: Tokodon
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-05 18:28 UTC by Zak
Modified: 2023-01-14 18:36 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zak 2023-01-05 18:28:13 UTC
Tokodon crops images in timeline views to an arbitrary maximum height with no visual indication that they are cropped, or hint as to their real aspect ratio. For those of us who create and follow visual art, that's a pretty unpleasant experience. 

Scaling images would be better because the whole image is visible while still allowing a limit on vertical space. As a further enhancement, there could be a setting for the height limit.
Comment 1 Joshua Goins 2023-01-12 19:22:30 UTC
This is intentional, as it matches Mastodon behavior whenever it is requested to crop images (this is controlled via user preference) - however I don't think focus point is taken into account. You're right that there should be an option to not crop it.

I'm actually implementing this feature, but I don't have a MR up yet - the related issue is https://invent.kde.org/network/tokodon/-/issues/50 though
Comment 2 Zak 2023-01-12 19:48:36 UTC
Tokodon's behavior does not match Mastodon's; Mastodon crops to 16:9 by default while Tokodon crops to a specific height, but the full width of the window, which results in a tiny sliver of the image being shown when the window is set large. Tokodon is also not honoring my preference to never crop images set in Mastodon. I don't like either cropping behavior, but if the thinking is to match what Mastodon does, Tokodon currently doesn't.

Simply showing the image scaled to the width of the screen when the crop preference is eventually supported isn't ideal either, as that will lead to images taller than the viewport. Scaling based on the larger of window width and a percentage of hegiht would allow viewing the whole image in-line.
Comment 3 Joshua Goins 2023-01-12 19:51:36 UTC
(In reply to Zak from comment #2)
> Tokodon's behavior does not match Mastodon's; Mastodon crops to 16:9 by
> default while Tokodon crops to a specific height, but the full width of the
> window, which results in a tiny sliver of the image being shown when the
> window is set large. Tokodon is also not honoring my preference to never
> crop images set in Mastodon. I don't like either cropping behavior, but if
> the thinking is to match what Mastodon does, Tokodon currently doesn't.

I'll fix that as well, I didn't realize Tokodon didn't properly crop stuff to 16:9
(I've only been using Tokodon in small windows, oops)

> Simply showing the image scaled to the width of the screen when the crop
> preference is eventually supported isn't ideal either, as that will lead to
> images taller than the viewport. Scaling based on the larger of window width
> and a percentage of hegiht would allow viewing the whole image in-line.

I think that's what I'll eventually go with, because scaling up images on my 4K
UHD desktop would look crazy too :v
Comment 4 Joshua Goins 2023-01-14 18:36:57 UTC
Git commit 7fcd1f2ec2d160ab54e65b609277eebf1d6c797b by Joshua Goins.
Committed on 14/01/2023 at 16:51.
Pushed by redstrate into branch 'master'.

Improve layouts of media attachments

This improves the layouts of attachments in several ways:
* Multiple attachments are always 16:9
* Single attachments can either be cropped to 16:9 or full height
* Removes the extra margins which should've been on the attachment
grid itself, not on individual items

Signed-off-by: Joshua Goins <josh@redstrate.com>

M  +4    -0    src/config.kcfg
M  +26   -6    src/content/ui/PostDelegate.qml
M  +13   -1    src/content/ui/Settings/GeneralCard.qml
M  +1    -0    src/content/ui/TimelinePage.qml

https://invent.kde.org/network/tokodon/commit/7fcd1f2ec2d160ab54e65b609277eebf1d6c797b