|
From: <cre...@us...> - 2007-02-27 08:00:30
|
Revision: 1635
http://svn.sourceforge.net/frontierkernel/?rev=1635&view=rev
Author: creecode
Date: 2007-02-27 00:00:29 -0800 (Tue, 27 Feb 2007)
Log Message:
-----------
in centerbuttonstring function, ellipsize strings from middle
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/quickdraw.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/quickdraw.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/quickdraw.c 2007-02-27 04:38:00 UTC (rev 1634)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/quickdraw.c 2007-02-27 08:00:29 UTC (rev 1635)
@@ -1298,25 +1298,28 @@
void centerbuttonstring (const Rect *r, bigstring bs, boolean fldisabled) {
-
- /*
- draw the string in the current font, size and style, centered inside
- the indicated rectangle.
-
- 11/10/89 DW: workaround wierdnesses in geneva 9 by subtracting 1 from v.
-
- 9/10/91 dmb: geneva 9 workaround can mess up other fonts; added check to
- ensure top of characters aren't cut off
- 6.26.97 dmb: added fldisabled, renamed as centerbuttonstring
- */
+ //
+ // draw the string in the current font, size and style, centered inside the
+ // indicated rectangle.
+ //
+ // 2007-02-26 creedon: ellipsize strings from middle
+ //
+ // 1997-06-26 dmb: added fldisabled, renamed as centerbuttonstring
+ //
+ // 1991-09-10 dmb: geneva 9 workaround can mess up other fonts; added
+ // check to ensure top of characters aren't cut off
+ //
+ // 1989-11-10 DW: workaround wierdnesses in geneva 9 by subtracting 1 from
+ // v.
+ //
register short lh = globalfontinfo.ascent + globalfontinfo.descent; /*line height*/
register short rh = (*r).bottom - (*r).top;
register short rw = (*r).right - (*r).left;
register short h, v;
- ellipsize (bs, rw); /*make sure it fits inside the rectangle, width-wise*/
+ ellipsizemiddle (bs, rw); /*make sure it fits inside the rectangle, width-wise*/
h = (*r).left + ((rw - stringpixels (bs)) / 2);
@@ -1338,6 +1341,7 @@
Drawstring (bs, fldisabled);
popclip ();
+
} /*centerbuttonstring*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|