cawbird icon indicating copy to clipboard operation
cawbird copied to clipboard

Maximized Picture fits not on phone screen

Open Alexmitter opened this issue 4 years ago • 7 comments

The dimensions of the maximized picture viewer seem to only respect the screen height but not width. This is especially noticeable on a phone screen.

  1. Click on picture of tweet to maximize it
  2. Observe

Expected behavior Maximized picture viewer respects both with and height of screen and scales the picture accordingly.

Screenshots crawbird1 crawbird2

System details:

  • OS: Mobian(Debian bullseye)
  • Version: 1.1.0
  • Flatpak from Flathub

Otherwise the app works great on the phone, so it got listed as a working app in the mobian wiki.

Alexmitter avatar Jun 16 '20 11:06 Alexmitter

I could be wrong, but I can see whitespace all around that image, so I think it is respecting the width but it's scaling based on maximum height (so rather than show a small image that's actually no bigger than the original, it shows it as large as it can and lets you scroll it).

It's not great in this example, and I don't know why GTK doesn't do better "this can scroll" indicators, but what would it gain in this situation to make the image scale to the width of the device and basically only be as big as the thumbnail that you clicked on?

I'm thinking about the "rotated phone" situation and I'm not sure that the rest of the UI would work all that well like that!

It's good to hear that it otherwise works well on Mobian, though 🙂

IBBoard avatar Jun 16 '20 18:06 IBBoard

but what would it gain in this situation to make the image scale to the width of the device and basically only be as big as the thumbnail that you clicked on?

You are right on that, it would not be much larger, but it could behave like other twitter apps in this regard so you get the picture and black around it. In this case now, I am reporting it as it is behavior not expected by the user.

I'm thinking about the "rotated phone" situation and I'm not sure that the rest of the UI would work all that well like that!

crawbird-land1 crawbird-land2

Alexmitter avatar Jun 16 '20 19:06 Alexmitter

We can't really paint the rest of the screen black - that's not an expected behaviour on Desktop (which is the main target).

It looks like rotated is workable, but the images still aren't much bigger and you lose a lot of space to the UI. Also, I think our "95% of the size of the display" metric fails slightly - the image overlaps appears to overlap at the top.

IBBoard avatar Jun 16 '20 20:06 IBBoard

Currently the maximized picture seems to be just a child window that displays the picture but nothing more. But twitter apps usually display a bit more. They display some solid(android) or transparent(web) colored background to move the focus and the usual answer, retweet, like and share buttons. Web: image Android: photo_2020-06-17_12-49-16

But at the end, thats just a proposal. For now, if the maximized picture could just respect screen height and width and with is all needed to make it work fine for phone users.

Alexmitter avatar Jun 17 '20 10:06 Alexmitter

I'm thinking about this and wondering whether we can do some kind of "if main window is maximised" check. Because if the user has the window maximised then it's almost certainly on mobile (I can't see most people maximising it on a landscape 1080p desktop monitor, for instance) and even if it isn't then Cawbird is already dominating the screen so drawing a background isn't too bad.

I'm still not sure what it is best to do about the zoom behaviour, though. On desktop, you click because you want to see it bigger and so we show it 1:1. If it is too big for your screen then you can scroll it. That's exactly what we do here*. It's just that the vertical view means you only see part of the image. I don't want to scale to the smallest window dimension by default because that defeats the point of viewing the larger version.

Maybe when I get round to adding "fit" and "1:1" scaling buttons for images then it'll resolve it (and give desktop users more options on how to view big images).

* give or take the fact that the phone OS doesn't report GdkMonitor.get_workarea() correctly in horizontal mode and so our "max 95% of space" calculation still overlaps with the black bars at the top and bottom, whereas it should be doing 95% of the space between the black bars

IBBoard avatar Sep 03 '20 13:09 IBBoard

Another option for mobile usage is maybe allow for a setting where opening a picture in Cawbird will open the image with another application, e.g firefox or an image viewer. This will also be useful for other media as well, especially videos and Youtube. With pinephone for example, Firefox plays youtube perfectly.

m0jek avatar Oct 27 '20 10:10 m0jek

You should already be able to do that. There's a right-click interaction on images and videos (which should be long-click on mobile?) that has an "Open in browser" option as well as "Save as" (and "Copy URL" for images but not videos, because Twitter only links to the tweet and not the video).

Cawbird only plays Twitter's videos, not YouTube's, so we'd already be redirecting people to their default browser (or an app, if the OS is configured to intercept and redirect certain URL patterns to an app)

IBBoard avatar Oct 27 '20 15:10 IBBoard