-
Notifications
You must be signed in to change notification settings - Fork 15k
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
[Feature Request]: Accept decimal width/hight for BrowserWindow #42222
Labels
Comments
This is not a bug; it's a feature request. As it stands, you owe Electron a whole-pixel value here and it's your job to round it. |
clavin
changed the title
[Bug]: Decimal width and height not respected
[Feature Request]: Accept decimal width/hight for BrowserWindow
May 21, 2024
This was actually addressed as a side effect of #42056 - as of this PR, you can pass in double values and they will be rounded to the nearest number and set to that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Preflight Checklist
Electron Version
30.0.1
What operating system are you using?
Windows
Operating System Version
Windows 10 version 22H2 (OS build 19045.4291)
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
It should set width/height to the exact number; or at least the nearest number.
Actual Behavior
It falls back to the default value of the property that has a decimal number.
Testcase Gist URL
No response
Additional Information
It just doesn't respect the decimal number.
As example, if the width of the BrowserWindow is set to 3.14, it uses the default value; which is 800.
The text was updated successfully, but these errors were encountered: