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

Question/request: Is there a way to keep aspect ratio when resizing the window manually ? #2387

Closed
AndroidDeveloperLB opened this issue Jun 14, 2021 · 6 comments

Comments

@AndroidDeveloperLB
Copy link

I've tried to search about it, but is there a way to keep the aspect ratio of the window, when I manually resize the window (meaning I exclude the single clicking for full-screen resizing, whether by keyboard or by mouse) ?
This way the window of ScrCpy will fit nicely with the content it shows (again, I'm excluding the scenario of full screen).

I mean using this:

image

I want to avoid the black parts around the content.

Maybe like some video players (I use Media Player Classic), we could use CTRL key while resizing, to force staying on original aspect ratio?
Or force it by a flag?
Or both?

@rom1v
Copy link
Collaborator

rom1v commented Jun 14, 2021

Duplicate of #2317. See #2317 (comment)

Note that you could remove the black borders after the resize by double-clicking on them, or Alt+w.

@rom1v rom1v closed this as completed Jun 14, 2021
@AndroidDeveloperLB
Copy link
Author

@rom1v Useful tips. A bit hard to double tap when they are thing though.

@AndroidDeveloperLB
Copy link
Author

@rom1v BTW, using the tips I've noticed an issue: It goes to the top-left corner, instead of resizing based on the content, meaning that when I use it, the content moves to somewhere else.

Is this bug reported?

rom1v added a commit that referenced this issue Jun 14, 2021
When removing the black borders (by double-clicking on them, or by
pressing MOD+w), the window is resized to fit the device screen, but its
top-left position was left unchanged.

Instead, move the window so that the new window area is at the center of
the old window area.

Refs #2387 <#2387>
rom1v added a commit that referenced this issue Jun 14, 2021
When removing the black borders (by double-clicking on them, or by
pressing MOD+w), the window is resized to fit the device screen, but its
top-left position was left unchanged.

Instead, move the window so that the new window area is at the center of
the old window area.

Refs #2387 <#2387>
@rom1v
Copy link
Collaborator

rom1v commented Jun 14, 2021

Indeed, it would be better if the device content stays at the same place.

I just implemented it: center_on_resize

@AndroidDeveloperLB
Copy link
Author

@rom1v Wow this was fast. Thank you!

@ballo
Copy link

ballo commented Dec 15, 2023

Indeed, it would be better if the device content stays at the same place.

I just implemented it: center_on_resize

Any way to disable resizing?

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

No branches or pull requests

3 participants