Closed BrokenSwing closed 5 years ago
I think the problem is that I haven't made a new release since #17, so the version of glooey on PyPI still has that bug. That's my bad, I kept wanting to get in a few more features before making a release.
I just made a 0.2.0
release now, so pip install --upgrade glooey
should fix the problem. Of course, it might cause other problems, like #29, but I'll try to fix that ASAP.
Ok, it's not crashing anymore with the 0.2.0, but I don't know if it's an expected behavior but the placeholder doesn't fit the window size. With the same code I gave previously I get this :
And if I try to resize the placeholder or the Gui with set_size_hint
, it crashes with an RuntimeError : RuntimeError: Gui(id=14b0) is only 640x480, but its children are 500x500.
Maybe I didn't understand the purpose of this method, if so, I'm sorry.
gui = glooey.Gui(window)
gui.set_size_hint(500, 500)
placeholder = glooey.Placeholder()
placeholder.set_size_hint(500, 500)
gui.add(placeholder)
Can you post the full script you're using? The following seems to work for me, with or without either set_size_hint()
line:
#!/usr/bin/env python3
import pyglet
import glooey
def main():
window = pyglet.window.Window(visible=False)
window.set_size(500, 500)
# Initialize window
gui = glooey.Gui(window)
gui.set_size_hint(500, 500)
placeholder = glooey.Placeholder()
placeholder.set_size_hint(490, 490)
gui.add(placeholder)
window.set_visible()
pyglet.app.run()
if __name__ == '__main__':
main()
Also, you should upgrade to 0.2.1
now; there was a bug in the 0.2.0
release (not related to this, though).
Hello, I'm having troubles running an example.
I use :
Here's the code causing a crash :
And here's the crash I got :
It seems to come from the
window.set_size(500, 500)
because when I delete it, it doesn't crash anymore. Seems to be pretty related to #17 . Thank you for reading