Skip to content

Commit

Permalink
"Fixed" the invisible dialog error, as in #209
Browse files Browse the repository at this point in the history
The problem was that if you center a dialog wider/taller than the screen, it will overflow. Since albow draws widgets by openGL, it won't accept negative coordinates for the bottom left corner. my hotfix minimizes these coordinates.

This is not a complete solution, and some of the filters, for example, will still be out of the screen. At least now we see what's going on.
  • Loading branch information
dratini0 committed Apr 2, 2013
1 parent 2709a37 commit 8beecc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion albow/widget.py
Expand Up @@ -743,7 +743,7 @@ def gl_draw_all(self, root, offset):
GLU.gluOrtho2D(0, w, 0, h)
GL.glMatrixMode(GL.GL_MODELVIEW)
GL.glLoadIdentity()
GL.glRasterPos2i(rect.left, h - rect.bottom)
GL.glRasterPos2i(max(rect.left, 0), max(h - rect.bottom, 0))
GL.glPushAttrib(GL.GL_COLOR_BUFFER_BIT)
GL.glEnable(GL.GL_BLEND)
GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA)
Expand Down

0 comments on commit 8beecc1

Please sign in to comment.