tooltips were part way of the bottom of the screen (timeline play button for eg)
authorCampbell Barton <ideasman42@gmail.com>
Tue, 5 Apr 2011 12:05:47 +0000 (12:05 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 5 Apr 2011 12:05:47 +0000 (12:05 +0000)
source/blender/editors/interface/interface_regions.c

index 22d91a7a7471534cdaf598daf821365755a246d7..4457ec6b3231ffb6aba50fe2a2b674c0810a0c27 100644 (file)
@@ -529,9 +529,11 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
                        x2= winx;
                }
        }
-       if(y1 < 0) {
-               y1 += 56;
-               y2 += 56;
+       /* ensure at least 5 px above screen bounds
+        * 25 is just a guess to be above the menu item */
+       if(y1 < 5) {
+               y2 += (-y1) + 30;
+               y1 = 30;
        }
 
        /* widget rect, in region coords */