phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

Overlay resize not fully working

Open sponce opened this issue 3 years ago • 6 comments

When using an overlay and resizing the window of the overlay, the window resizes but not the image inside the windows, so the windows is half empty

sponce avatar Jun 29 '22 09:06 sponce

You mean like this?

image

It was implemented a long time ago. If I remember correctly, there were some issues with the renderer not able to change size at run-time or something like that. And not being able to change the aspect ratio skews the overlay view.

9inpachi avatar Jun 29 '22 10:06 9inpachi

Can I work on this issue if it has not been assigned to anyone?

Somya-Bansal159 avatar Mar 01 '23 20:03 Somya-Bansal159

Sure, go ahead.

9inpachi avatar Mar 01 '23 21:03 9inpachi

The portion of the display which is to be displayed in the overlay is fixed (shown by a black rectangle in the image below) and on resizing the window, the same overlay view is getting resized keeping the aspect ratio fixed. So if I resize the overlay window, then there are two possibilities:

  1. Extra portion from the event display (red rectangle) gets added in the overlay. this
  2. The view which is already there gets resized by changing its aspect ratio (i.e. gets squeezed) in order to fill the overlay window. that

I am able to achieve the second one as of now. So, which one should I try to implement?

Somya-Bansal159 avatar Mar 05 '23 09:03 Somya-Bansal159

Do you know how you will render and add the extra red part in the first option? I don't think it's worth the effort since we would probably need workarounds to achieve that. The second option was previously implemented but was changed later to keep the aspect ratio and not skew the view. It may be possible to change the overlay renderer aspect ratio (width/height) on resizing the overlay window.

A third option could be to lock aspect ratio when resizing, but that will need to be configurable in the overlay window component because other places it's used in (like the collections info panel) don't need to lock the aspect ratio.

On Sun, Mar 5, 2023 at 10:38 AM Somya Bansal @.***> wrote:

The portion of the display which is to be displayed in the overlay is fixed (shown by a black rectangle in the image below) and on resizing the window, the same overlay view is getting resized keeping the aspect ratio fixed. So if I resize the overlay window, then there are two possibilities:

  1. Extra portion from the event display (red rectangle) gets added in the overlay. [image: this] https://user-images.githubusercontent.com/77807055/222952608-1acee640-8c06-434e-9ba9-71bd6684b0ee.png
  2. The view which is already there gets resized by changing its aspect ratio (i.e. gets squeezed) in order to fill the overlay window. [image: that] https://user-images.githubusercontent.com/77807055/222952863-c8ef011b-f11c-4129-a441-072cf398959b.png

I am able to achieve the second one as of now. So, which one should I try to implement?

— Reply to this email directly, view it on GitHub https://github.com/HSF/phoenix/issues/467#issuecomment-1455039122, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIZVY6LYMRMZNQTXEDRJSJLW2RNLDANCNFSM52FDI7JQ . You are receiving this because you commented.Message ID: @.***>

9inpachi avatar Mar 05 '23 11:03 9inpachi

I have added a boolean attribute in the overlay component, which is passed as true in case of the overlay-view component, else its default value is false. So, while resizing, this boolean value is checked, and if it is true (which means we are currently dealing with an overlay-view component), then the aspect ratio is locked. So, it is working on my side.

Somya-Bansal159 avatar Mar 05 '23 13:03 Somya-Bansal159

Fixed (I believe).

EdwardMoyse avatar Nov 08 '24 21:11 EdwardMoyse