pomotroid icon indicating copy to clipboard operation
pomotroid copied to clipboard

Make window resizable

Open Mortasen opened this issue 3 years ago • 7 comments

This update allows users to resize the window with keeping the aspect ratio. Since all absolute units (px) were replaced with relative ones (vw), the window looks good and the layout is preserved regardless of the size. It resolves issues #149, #79, and partially #22.

Mortasen avatar Sep 14 '22 15:09 Mortasen

Let me know if anything should be improved before merging, I would be glad to help! And sorry if something's wrong, because it's practically my first PR

Mortasen avatar Sep 14 '22 16:09 Mortasen

@Namerif This is a brilliant idea. Thank you for the PR!

When building this locally, I don't think I'm seeing expected behavior (see attachments).

The first screenshot shows the app when launching. It's tiny (cursor for reference). The second screenshot is after resizing manually. Looks like the window has lost its aspect ratio.

NVIDIA_Share_qmMierauSH NVIDIA_Share_r0t6Obe8M5

Splode avatar Sep 15 '22 23:09 Splode

@Splode glad you like the idea, thanks! And yes, it's definitely not the expected behavior. Which OS do you use? If Windows, it's probably because of the Electron bug that setAspectRatio method I used was not working. It was fixed in 11.2.0 though.

Therefore, I see three possible solutions:

  1. Update Electron to that version (likely the most seamless resizing option)
  2. Use this module
  3. Write a resize event handler that will keep the aspect ratio

So please let me know which solution for you is preferred, and if it's the third, I'll update the PR. Otherwise, I will need your help because unfortunately, I have very little experience developing Electron apps and I doubt I will be able to change the dependencies correctly.

Mortasen avatar Sep 16 '22 08:09 Mortasen

@Splode Kindly do the needful for this PR and concerned Issues as i wish to use it in the fancy zone in windows

mohamedashic avatar Sep 30 '22 15:09 mohamedashic

I am not familiar with coding. I have downloaded pomotroid from the website but how can I actually incorporate your code to make it resizable?

ans-sigalas avatar Mar 15 '23 00:03 ans-sigalas

@ans-sigalas I don't think you would be able to do that without any basic software development knowledge unfortunately.

Mortasen avatar Apr 15 '23 12:04 Mortasen

I don't have a lot of experience with electron specifically, but I'm going to give this a shot at trying to implement the different options you listed, hopefully there's still interest in this being a complete feature.

AmishAlvi avatar Feb 15 '24 21:02 AmishAlvi