Closed sparshg closed 1 year ago
Tested, b403611 doesn't remove create toolbar though.
The activity canvas doesn't adjust after create toolbar is hidden, instead the lower part comes up and shows the base of the canvas;
After the colors tool bar button is hidden, the top part of the canvas is left with a mark of the toolbar.
Tested, https://github.com/sugarlabs/physics/commit/b4036112022c63ab4f96d5ce04fefc3da4553188 doesn't remove create toolbar though.
I think it was because toolbar_box.show_all()
was removed. I confirmed it was working before this commit.
I am working to fix other problems meanwhile.
I think it was because
toolbar_box.show_all()
was removed. I confirmed it was working before this commit.
Yeah you're probably correct
Okay so this is what I found, (included in commit)
the top part of the canvas is left with a mark of the toolbar.
Sugargame doesn't detect resize due to open/closing of menu by create_toolbar
(and other similar dropdown widgets). This leads to a horizontal gap because the pygame canvas is not resized when the menu is hidden.
lower part comes up
Also, using the color selector dropdown does trigger the resize and the pygame canvas fills the gap. But now all the elements are shifted up because (0, 0) of pygame canvas is shifted up.
A solution to all of this would be to not show the create_toolbar
by default, eliminating the need to resize the canvas anytime.
Tested 7f8cfbd, works as expected and seems like a preferred solution.
@quozl any objections?
No objections. Give it a good test.
Button to show create toolbar got deleted in b4036112022c63ab4f96d5ce04fefc3da4553188 Closes #54 @chimosky