olive-groves / butterfly_viewer

Side-by-side image viewer with synchronized zoom and sliding overlays. Drag and drop to instantly compare multiple images on your desktop. Very open source.
https://olive-groves.github.io/butterfly_viewer/
Other
22 stars 3 forks source link

[Feature/Bug] Order images first to last when arranged as a grid #60

Open NEKolev opened 2 months ago

NEKolev commented 2 months ago

Is there an existing request for this feature?

Is your feature request related to a problem?

Proper arrangement of the coins in the grid. In my opinion, the expected behaviour is for the images to be arranged from top to bottom, from left to right. In other words, the first image - top left, the second image top right, the third bottom left, the fourth bottom right, and so on. At the moment they are arranged exactly the opposite.

https://github.com/olive-groves/butterfly_viewer/assets/70388317/63163da9-d9e2-42c3-845f-6d1363ae1efb

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Anything else?

No response

larsmaxfield commented 2 months ago

TL;DR: Good feature (and actually more of a bug), but I likely won't get to it soon. __

Unfortunately the video you added doesn't play for me:

image

Nevertheless if I understand correctly, this is an issue regarding the order of the images when they are arranged as a grid. Specifically, that the order is not in the order they are added into the Viewer (from first to last), but rather in what seems to be reverse order (from last to first).

I agree that the order should be from first added to last added.

I've actually known of this issue since I started making this app. Unfortunately it is the standard behavior of the tileSubWindows() slot in Qt's QMdiArea. And it's actually worse than reverse order — rather, the tiling (arranging) order changes based on the last image window you've interacted with, but that change only then happens when you resize the Viewer window. So I would classify it as both a feature and a bug.

I remember trying to solve this but giving up. I think because I had then successfully implemented both horizontal and vertical arrangement which both preserve the first-to-last image order.

But now as I write this, perhaps the solution is to simply create my own grid arrangement method which preserves the order. That will be a bit more tricky though, especially when the number of image windows is a prime number above two because one of the windows will need to be bigger.

NEKolev commented 2 months ago

TL;DR: Good feature (and actually more of a bug), but I likely won't get to it soon. __

Unfortunately the video you added doesn't play for me:

image

Nevertheless if I understand correctly, this is an issue regarding the order of the images when they are arranged as a grid. Specifically, that the order is not in the order they are added into the Viewer (from first to last), but rather in what seems to be reverse order (from last to first).

I agree that the order should be from first added to last added.

I've actually known of this issue since I started making this app. Unfortunately it is the standard behavior of the tileSubWindows() slot in Qt's QMdiArea. And it's actually worse than reverse order — rather, the tiling (arranging) order changes based on the last image window you've interacted with, but that change only then happens when you resize the Viewer window. So I would classify it as both a feature and a bug.

I remember trying to solve this but giving up. I think because I had then successfully implemented both horizontal and vertical arrangement which both preserve the first-to-last image order.

But now as I write this, perhaps the solution is to simply create my own grid arrangement method which preserves the order. That will be a bit more tricky though, especially when the number of image windows is a prime number above two because one of the windows will need to be bigger.

Most likely you have an ad blocker or something else that stops the playback. I uploaded the clip here, but either way, the problem is exactly what you described in detail.

larsmaxfield commented 2 months ago

Most likely you have an ad blocker or something else that stops the playback. I uploaded the clip here, but either way, the problem is exactly what you described in detail.

Thanks for confirming and for adding the alternate video link. Indeed the video issue seems to be coming from my side.