* removed unused function
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21682 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -496,25 +496,6 @@ Decorator::UIColor(color_which which)
|
|||||||
\param width Maximum number of pixels the title can be
|
\param width Maximum number of pixels the title can be
|
||||||
\return the number of characters that will fit in the given width
|
\return the number of characters that will fit in the given width
|
||||||
*/
|
*/
|
||||||
int32
|
|
||||||
Decorator::_ClipTitle(float width)
|
|
||||||
{
|
|
||||||
// TODO: eventually, use ServerFont::TruncateString()
|
|
||||||
// when it exists (if it doesn't already)
|
|
||||||
if (fDrawingEngine) {
|
|
||||||
int32 strlength = fTitle.CountChars();
|
|
||||||
float pixwidth=fDrawingEngine->StringWidth(fTitle.String(),strlength,&fDrawState);
|
|
||||||
|
|
||||||
while (strlength >= 0) {
|
|
||||||
if (pixwidth < width)
|
|
||||||
return strlength;
|
|
||||||
|
|
||||||
strlength--;
|
|
||||||
pixwidth=fDrawingEngine->StringWidth(fTitle.String(), strlength, &fDrawState);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Function for calculating layout for the decorator
|
//! Function for calculating layout for the decorator
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -119,12 +119,6 @@ class Decorator {
|
|||||||
RGBColor UIColor(color_which which);
|
RGBColor UIColor(color_which which);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int32 _ClipTitle(float width);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief Returns the number of characters in the title
|
|
||||||
\return The title character count
|
|
||||||
*/
|
|
||||||
int32 _TitleWidth() const
|
int32 _TitleWidth() const
|
||||||
{ return fTitle.CountChars(); }
|
{ return fTitle.CountChars(); }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user