Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

[Windows] GUI renders wrong when using high DPI monitors #45

Closed
AmonBune opened this issue Jan 9, 2020 · 29 comments · Fixed by #58
Closed

[Windows] GUI renders wrong when using high DPI monitors #45

AmonBune opened this issue Jan 9, 2020 · 29 comments · Fixed by #58

Comments

@AmonBune
Copy link

AmonBune commented Jan 9, 2020

When using a monitor over 100% DPI (for example a 4K display) the whole GUI and controls render wrong. Here a Screenshot of the issue:
image

@srevinsaju
Copy link
Owner

oh Lord 😂.

this was one of the issues pointed out by one of my clients using guiscrcpy. there are few steps to fix this:

  • download and install guiscrcpy 2.0
  • resize the window to make guiscrcpy visible

thanks for letting me know. I would add the screen size to the configuration file so that you won't have to resize over an over

@AmonBune
Copy link
Author

AmonBune commented Jan 10, 2020

@srevinsaju Oh Lord, yes. 😂
The main window is actually not very much of a problem. Surely it is annoying and looks horrible when everything is scrambled like that, but the greater issue is the floating action bars. They cannot be resized per design and it's hard to guess what each button does or even click the correct one because they overlap each other in some cases.

Anyway, it would be great to have a nice GUI with high DPI screens without fiddling with the window sizes on every startup 💃

@srevinsaju
Copy link
Owner

Ok @AmonBune thanks for the review, It seems like the toolbar icons are oversized comaparative to the window. Did you install 2.0 and check?

@AmonBune
Copy link
Author

AmonBune commented Jan 10, 2020

@srevinsaju Version 2.0 looks like this:

image

As you can see, the buttons are pretty small. It would be nice if they could be made a little larger (according to the dpi percent). Also the two buttons (or whatever that is) on the bottom left edge of both button panels look a little weird to me. The main window is the same as in Version 1.x

@srevinsaju
Copy link
Owner

@AmonBune Hope this will be fixed in v3.0, releasing in few minutes

@srevinsaju
Copy link
Owner

@AmonBune please see V3.0

@AmonBune
Copy link
Author

@srevinsaju I'm not able to install version 3.0 correctly. Something seems to be wrong.

image

pip --version
pip 20.0.2 from c:\python38\lib\site-packages\pip (python 3.8)

Also I managed to install some weird "-uiscrcpy" package. Don't ask me how I did that. I cannot uninstall it because of the dash in the name...
image
image

@srevinsaju
Copy link
Owner

@AmonBune seems like your pip packages are messed up completely.
try this

pip uninstall '-uiscrcpy'

the way to run guiscrcpy is

python -m guiscrcpy

you can do the above in any directory, it's not necessary to go to that folder.

PS: I don't know why exactly you are not able to run guiscrcpy only and make it run.
alternatively, if you prefer the exe compiled files, you can get it from the releases.

@AmonBune
Copy link
Author

AmonBune commented Feb 10, 2020

@srevinsaju image
Nothing seems to work... I also never got a desktop or a start menu shortcut. Also not with version 1.x or 2.x. I'll try to uninstall python, pip and all packages and see if it behaves the same again or if it is fixed then.

@srevinsaju
Copy link
Owner

@AmonBune, there is no need to uninstall pip, you can manually delete the folders

Go that directory where you went before, C:/users/.../../site-packages/ in your explorer, remove all the guiscrcpy and uiscrcpy files and then go for a clean install of guiscrcpy
https://pypi.org/project/guiscrcpy/
guiscrcpy · PyPI

Copy paste the code specified in the website, and then it should work.

@srevinsaju
Copy link
Owner

Alternatively, try the exe also ;)

@AmonBune
Copy link
Author

@srevinsaju I can try the plain windows exe later.

Regarding pip:

I deleted all folders regarding guiscrcpy and the uiscrcpy stuff. I reinstalled and got the error:
No module named guiscrcpy.__main__; 'guiscrcpy' is a package and cannot be directly executed
image

And there is actually no __main__.py in the folder.
image

And I randomly opened the __init__.py whose content confuses me. Version 2? It said it installed Version 3 when executing the pip install.
image

I thought it is a problem with using an administrator shell, but I have tried the same thing with a user shell and I have the same results.

@srevinsaju
Copy link
Owner

@AmonBune my mistake, I tested it again after removing all my installation on Windows, and it shows the same error
Fixed on 11b5b26

Thanks for finding that bug, it was a potential security fix on many devices including MacOS

@srevinsaju
Copy link
Owner

@AmonBune I have made a package for you, you may test it, so I can push it to v3.1

guiscrcpy-3.0.post17.dev0.tar.gz

@AmonBune
Copy link
Author

AmonBune commented Feb 13, 2020

@srevinsaju I cannot install the tar.gz package on my machine. I uninstalled the existing guiscrcpy with pip uninstall guiscrcpy.

image

@srevinsaju
Copy link
Owner

@AmonBune no need to extract the tar.gz,
do

pip install guiscrcrpy-3.0.post17.dev0.tar
gz

@AmonBune
Copy link
Author

@srevinsaju In the window with the red error I tried just that. I just wanted to show that both methods don't work.

@srevinsaju
Copy link
Owner

@AmonBune
Copy link
Author

@srevinsaju
image

@srevinsaju
Copy link
Owner

I guess the last option is :

git clone https://github.com/srevinsaju/guiscrcpy
cd guiscrcpy
pip install .

@AmonBune
Copy link
Author

Install works, but I get the same error as before :(
image

@srevinsaju
Copy link
Owner

@AmonBune try only guiscrcpy
if that fails too, please let me know,
for the sake of this issue, try

python -c 'from guiscrcpy.launcher import bootstrap; bootstrap ()'

@AmonBune
Copy link
Author

@srevinsaju It works, but adb.exe and scrcpy.exe don't get shipped with the pip install.
image

@srevinsaju
Copy link
Owner

srevinsaju commented Feb 14, 2020

yea, we have to manually download scrcpy release from https://github.com/Genymobile/scrcpy/releases , actually I am not supposed to add scrcpy.exe to the package as it's copyrighted.

does running guiscrcpy work now or did you use python -c .... that one?

thanks, when this gets released, I will give credits to you for sure!

@AmonBune
Copy link
Author

guiscrcpy worked. python -c ... did not work and threw some error

@srevinsaju
Copy link
Owner

ok thanks for that, is the DPI error fixed too?

@AmonBune
Copy link
Author

@srevinsaju When I start up the application, everything is good:
image

But I can resize it a little bit too much. Just increase the min height a little bit here:
image

I have to test the other windows later, I have no phone here at the moment

@srevinsaju srevinsaju linked a pull request Feb 16, 2020 that will close this issue
Merged
@AmonBune
Copy link
Author

@srevinsaju The sizing of the icons look good to me:
image

@srevinsaju
Copy link
Owner

Thanks for testing @AmonBune, I will close the issue with my open PR for version 3.2
Keep looking for more features,
wifi + automatic scrcpy installer (as suggested in your previous issue) + update checker

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

Successfully merging a pull request may close this issue.

2 participants