-
Notifications
You must be signed in to change notification settings - Fork 42
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
The opened windows on Windows does not have the right height #44
Comments
Could you show the code used to invoke the prompt window? |
|
I remember this happening to me too. If you don't set the height, it defaults to 130, which is not enough even for this kind of simple input window on windows. My guess is that on OS X the font/input box/buttons/padding or whatnot is different size than on windows and everything fits snuggly. Probably only way around this is to check which platform you are on and set height accordingly. |
I'd probably prefer a solution that would just set a window client size instead of trying to find the correct window size (including borders) on each platform. |
Yeah, that was my tired attempt to explain on the last line 😩 To set the window height automatically according to the content the default behaviour. I'll try to find time to play around with this in the next few days and see if it's easy to implement. |
Ok, it seems there's something weird going on with my win10 machine. If you put the height to 330, it's only around 280... So where's the missing 50 pixels:thinking:? As a side note, I wrote this little function about a year ago for one of my apps to resize the electron window height to fit all the content in the window without scroll bars. Might be useful when thinking a solution for this issue. |
Found the missing pixels, culprit is the BrowserWindow option useContentSize , if set to false, I get the default 130 pixels for the height, but as you can see, it's not enough... Either there's some weird conflict with the settings or this is a bug in electron? |
Ok, after reading the electron issue and testing, simply setting the 'resizable' to true solves this issue So, I would propose that we change the resizable-option default to true, @p-sam ? |
Yeah, but as the option states, that would also make the window resizable, which is not desirable. You seem to want to set the width and height dynamically based on the content, and as I stated in my previous message, the ideal solution would be to set something commonly called as the "client size", which is the inner size of the window content (without chrome/border). I may look into this myself later, however I have other stuff on my TODO right now, sorry |
No worries, I was just curious about what caused this behaviour. Anyway, it's should be pretty easy for others to 'fix' this now if they bumb into this problem. |
Please check if everything is resolved on develop. The actual issue was that the minimum height changed for all platforms (and was wrong), however not all platforms would exhibit the same behavior with different values of resizable/useContentSize. I'll probably release a new version I have multiple confirmations that it works now. (Tested myself on Windows and OSX right now) |
Ok, glad to hear you found the actual problem. Comparing the master and developement branches, I see there is few new options and a lot of housecleaning done. Looks good to me for the next release 🚀 |
alright, let's go then |
fixed in v1.4.0 |
On Windows the displayed prompt is too small. On OS X the displayed prompt is correct.
The text was updated successfully, but these errors were encountered: