Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make window resizable #238

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Mortasen
Copy link

@Mortasen Mortasen commented Sep 14, 2022

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
Copy link
Author

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

@Splode
Copy link
Owner

Splode commented Sep 15, 2022

@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

@Mortasen
Copy link
Author

Mortasen commented Sep 16, 2022

@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.

@mohamedashic
Copy link

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

@ans-sigalas
Copy link

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?

@Mortasen
Copy link
Author

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

@AmishAlvi
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants