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

Fix TextEditor constructor #139

Merged
merged 2 commits into from
Apr 7, 2020
Merged

Fix TextEditor constructor #139

merged 2 commits into from
Apr 7, 2020

Conversation

StefRe
Copy link
Contributor

@StefRe StefRe commented Mar 31, 2020

spyder-ide/spyder@e4c5b1a introduced dynamic window sizing and hence removed the size argument in the TextEditor constructor, which results in an error here. This commit restores the previous behavior.

The dynamic sizing doesn't work for me: if I don't explicitly resize the window I end up with a window size of 278 x 242 pixel on my 1900 x 1200 double screen setup (Windows 10). If I just specify te.show() instead of te.resize(700, 500) then I get the same 700 x 500 window size. Maybe someone more knowledgeable about QT can get the dynamic sizing to work, but for the time being this PR just restores the old behavior.

spyder-ide/spyder@e4c5b1a introduced dynamic window sizing and hence removed the size argument in the TextEditor constructor. This commit restores the previous behavior.
@jitseniesen
Copy link
Member

Thanks for the PR!

The dynamic sizing doesn't work for me

It does not work for me either. I opened an issue in the Spyder repo.

@jitseniesen jitseniesen merged commit 0fa4926 into spyder-ide:master Apr 7, 2020
@StefRe StefRe deleted the patch-1 branch April 7, 2020 18:35
@StefRe
Copy link
Contributor Author

StefRe commented Apr 8, 2020

See my comment here. Sorry for the confusion.
So I guess we should replace te.resize(700, 500) by te.show(). Shall I send a PR or do you want to change it yourself?

@jitseniesen
Copy link
Member

Nice find! Please prepare a PR, if you don't mind.

I actually tried removing the .resize and I saw the window was too small, just like you said. However, I did not try adding the .show, because the .exec already shows the dialog.

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

Successfully merging this pull request may close these issues.

2 participants