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

Ensure Popups are resized in newly created window and when window is resized, fixes #1692 #1932

Merged
merged 9 commits into from Feb 26, 2021

Conversation

fpabl0
Copy link
Member

@fpabl0 fpabl0 commented Feb 9, 2021

Description:

Fixes #1692 and #1382 when #1931 is landed.

Checklist:

@fpabl0 fpabl0 changed the title Ensure Popups are resized in newly created window and when refreshed, fixes #1692 Ensure Popups are resized in newly created window and when window is resized, fixes #1692 Feb 9, 2021
@andydotxyz
Copy link
Member

This seems to break resizing with visible dialogs:

Screenshot 2021-02-10 at 11 42 01

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes here seem to break sizing in other areas.
Also it only has changed file dialog, not all dialogs.

dialog/file.go Outdated Show resolved Hide resolved
@fpabl0
Copy link
Member Author

fpabl0 commented Feb 10, 2021

This seems to break resizing with visible dialogs:

How do you test it? This solution can only be seen after #1931 is landed, as I said in the first comment.

@fpabl0
Copy link
Member Author

fpabl0 commented Feb 10, 2021

Also it only has changed file dialog, not all dialogs.

Yes, other dialogs need the same fix. That's why I put it in the Check List in the first comment.
I will mark this as a draft to avoid confusing, sorry.

@fpabl0 fpabl0 marked this pull request as draft February 10, 2021 14:57
@andydotxyz
Copy link
Member

Yes, other dialogs need the same fix. That's why I put it in the Check List in the first comment.

Ah of course, I missed that sorry. Draft seems like a good idea.

@andydotxyz
Copy link
Member

How do you test it? This solution can only be seen after #1931 is landed, as I said in the first comment.

Open fyne_demo go to dialogs and open a file dialog.
Then resized the window.

@andydotxyz
Copy link
Member

If you can merge in latest develop this should work now...

@fpabl0
Copy link
Member Author

fpabl0 commented Feb 23, 2021

@andydotxyz I have updated, check if now you can see the fix :), I still need to do the same change to other dialogs, but want feedback first :)

@andydotxyz
Copy link
Member

Thanks @fpabl0 now that it is overlayed on the other fix I don't see the issue I raised before, sorry for the confusion.
After quick testing it looks like a great fix. I'll do a proper review once you're happy with the code :)

@fpabl0
Copy link
Member Author

fpabl0 commented Feb 23, 2021

sorry for the confusion

No worries, it was my fault, because I opened this as PR instead of a draft 😅

I'll do a proper review once you're happy with the code :)

Great! 👍 I would like to know what is exactly the issue #707, how do I test it? There are comments in the code referencing that issue that this PR will overwrite so want to know if this overwrite still satisfies that workaround.

By the way, do you know what happened with the tests? It says that it was cancelled, but no more information 🧐

@fpabl0
Copy link
Member Author

fpabl0 commented Feb 24, 2021

Ok this is almost finished. I am not sure if I can add tests to this fix, because the real fix is actually on canvas implementation, that is overwritten in test environment 🤔

I would appreciate if @toaster can review this too, as he opened #707 and this PR is going to overwrite some things around that issue.

@andydotxyz
Copy link
Member

Ok this is almost finished. I am not sure if I can add tests to this fix, because the real fix is actually on canvas implementation, that is overwritten in test environment 🤔

For these things the tests go in internal/driver/glfw and internal/driver/gomobile - those use driver-specific canvases instead of the test objects.

@andydotxyz
Copy link
Member

It says that it was cancelled, but no more information 🧐

Sorry I don't know what happened - tests normally cancel if a newer commit was pushed or one of the other tests failed.
Looks like it was not a permanent failure.

@fpabl0 fpabl0 marked this pull request as ready for review February 24, 2021 16:37
@andydotxyz andydotxyz merged commit 1dcc40e into fyne-io:develop Feb 26, 2021
andydotxyz pushed a commit that referenced this pull request Feb 26, 2021
…resized, fixes #1692 (#1932)

* fix file dialog resize method, ensure popup overlays are refreshed when windows is created and resized
* remove logic in baseDialog.Resize that is already delegated to widget.PopUp
* remove unnecessary logic in popup.Resize
* changes applied to mobileDriver and testCanvas

fixes #1692
@fpabl0 fpabl0 deleted the fix/1692 branch February 26, 2021 15:56
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

Successfully merging this pull request may close these issues.

None yet

2 participants