Tweaked tooltip box drawing so that ends of tooltips don't fall of the end of the box

This commit is contained in:
Joshua Leung
2008-12-03 23:21:01 +00:00
parent 48cd47ab58
commit 853f2b0647

View File

@@ -251,7 +251,7 @@ static void ui_tooltip_region_draw(const bContext *C, ARegion *ar)
/* draw background */
glColor3f(1.0f, 1.0f, 0.8666f);
glRectf(0, 4, x2-x1-4, y2-y1);
glRectf(0, 4, x2-x1+4, y2-y1);
/* draw text */
glColor3ub(0,0,0);
@@ -307,8 +307,8 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
y2= but->y1-10;
y1= y2-but->aspect*((data->bbox.ymax+(data->bbox.ymax-data->bbox.ymin)));
y2 += 4;
x2 += 4;
y2 += 8;
x2 += 8;
if(butregion) {
/* XXX temp, region v2ds can be empty still */