From 8beecc1123d57bb8d1afea5687377f14bdc7a6ce Mon Sep 17 00:00:00 2001 From: dratini0 Date: Tue, 2 Apr 2013 18:40:39 +0200 Subject: [PATCH] "Fixed" the invisible dialog error, as in #209 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. --- albow/widget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/albow/widget.py b/albow/widget.py index c147b17..dfa10a4 100644 --- a/albow/widget.py +++ b/albow/widget.py @@ -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)