diff options
author | Matt Ebb <matt@mke3.net> | 2004-05-17 18:36:13 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2004-05-17 18:36:13 +0400 |
commit | a1f5e64239594d8b3d24f8efad5f379f6f25af3a (patch) | |
tree | 9e5c13f70287145955036d84d0cb367aefcffe8f /source | |
parent | 5454280f6c791c28d8f2a188c793a25a887220c0 (diff) |
Tweaked the display and positioning of tooltips so they aren't obscured by the mouse pointer.
This is addressing bug #952
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/interface.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index fa4b3fd4a00..bfaabd14b1f 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -2835,7 +2835,8 @@ static uiSaveUnder *ui_draw_but_tip(uiBut *but) { uiSaveUnder *su; float x1, x2, y1, y2; - + + #ifdef INTERNATIONAL if(G.ui_international == TRUE) { float llx,lly,llz,urx,ury,urz; //for FTF_GetBoundingBox() @@ -2844,20 +2845,20 @@ static uiSaveUnder *ui_draw_but_tip(uiBut *but) FTF_GetBoundingBox(but->tip, &llx,&lly,&llz,&urx,&ury,&urz, FTF_USE_GETTEXT | FTF_INPUT_UTF8); x1= (but->x1+but->x2)/2; x2= 10+x1+ but->aspect*FTF_GetStringWidth(but->tip, FTF_USE_GETTEXT | FTF_INPUT_UTF8); //BMF_GetStringWidth(but->font, but->tip); - y1= but->y1-(ury+FTF_GetSize()); y2= but->y1; + y1= but->y1-(ury+FTF_GetSize())-16; y2= but->y1-8; } else { FTF_GetBoundingBox(but->tip, &llx,&lly,&llz,&urx,&ury,&urz, FTF_NO_TRANSCONV | FTF_INPUT_UTF8); x1= (but->x1+but->x2)/2; x2= 10+x1+ but->aspect*FTF_GetStringWidth(but->tip, FTF_NO_TRANSCONV | FTF_INPUT_UTF8); //BMF_GetStringWidth(but->font, but->tip); - y1= but->y1-(ury+FTF_GetSize()); y2= but->y1; + y1= but->y1-(ury+FTF_GetSize())-16; y2= but->y1-8; } } else { x1= (but->x1+but->x2)/2; x2= 10+x1+ but->aspect*BMF_GetStringWidth(but->font, but->tip); - y1= but->y1-19; y2= but->y1+2; + y1= but->y1-35; y2= but->y1-6; } #else x1= (but->x1+but->x2)/2; x2= 10+x1+ but->aspect*BMF_GetStringWidth(but->font, but->tip); - y1= but->y1-19; y2= but->y1-2; + y1= but->y1-35; y2= but->y1-10; #endif /* for pulldown menus it doesnt work */ @@ -2885,7 +2886,6 @@ static uiSaveUnder *ui_draw_but_tip(uiBut *but) su= ui_bgnpupdraw((int)(x1-1), (int)(y1-2), (int)(x2+4), (int)(y2+4), 0); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); @@ -2907,7 +2907,7 @@ static uiSaveUnder *ui_draw_but_tip(uiBut *but) glRectf(x1, y1, x2, y2); glColor3ub(0,0,0); - glRasterPos2f( x1+3, y1+4); + glRasterPos2f( x1+3, y1+5); BIF_DrawString(but->font, but->tip, (U.transopts & USER_TR_TOOLTIPS)); glFinish(); /* to show it in the frontbuffer */ |