Change centered label to XmALIGNMENT_BEGINNING when too big to fit in space.

git-svn-id: svn://10.0.0.236/trunk@12353 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
slamm%netscape.com
1998-10-08 22:13:23 +00:00
parent 9fa76d6d7c
commit 2aba141d10

View File

@@ -1386,7 +1386,10 @@ XmLStringDraw(Widget w,
else if (alignment == XmALIGNMENT_CENTER ||
alignment == XmALIGNMENT_TOP ||
alignment == XmALIGNMENT_BOTTOM)
strAlignment = XmALIGNMENT_CENTER;
if (width <= rect->width - 4)
strAlignment = XmALIGNMENT_CENTER;
else
strAlignment = XmALIGNMENT_BEGINNING;
else
strAlignment = XmALIGNMENT_END;
/* XmStringDraw clipping doesnt work in all cases