mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 23:36:00 +02:00
Hoverwatch wordwrapping
This commit is contained in:
parent
ed30e7ad06
commit
142332baaa
3 changed files with 59 additions and 16 deletions
|
@ -862,6 +862,12 @@ namespace Beefy.gfx
|
|||
else if (stringEndMode == FontOverflowMode.Wrap)
|
||||
{
|
||||
int32 maxChars = (int32)GetCharCountToLength(workingStr, width);
|
||||
if (maxChars == 0)
|
||||
{
|
||||
if (workingStr.IsEmpty)
|
||||
break;
|
||||
maxChars = 1;
|
||||
}
|
||||
|
||||
int32 checkIdx = maxChars;
|
||||
if (checkIdx < workingStr.Length)
|
||||
|
|
|
@ -332,7 +332,12 @@ namespace Beefy.theme.dark
|
|||
}
|
||||
|
||||
using (g.PushColor(mTextColor ?? DarkTheme.COLOR_TEXT))
|
||||
g.DrawString(mLabel, labelX, 0, .Left, wantWidth, ((nextContentColumn != -1) || (listView.mEndInEllipsis)) ? .Ellipsis : .Overflow);
|
||||
{
|
||||
FontOverflowMode overflowMode = ((nextContentColumn != -1) || (listView.mEndInEllipsis)) ? .Ellipsis : .Overflow;
|
||||
if (listView.mWordWrap)
|
||||
overflowMode = .Wrap;
|
||||
g.DrawString(mLabel, labelX, 0, .Left, wantWidth, overflowMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -893,6 +898,7 @@ namespace Beefy.theme.dark
|
|||
public Color mGridLinesColor = 0x0CFFFFFF;
|
||||
public bool mShowHeader = true;
|
||||
public bool mEndInEllipsis;
|
||||
public bool mWordWrap;
|
||||
public float mLabelX = DarkTheme.sUnitSize;
|
||||
public float mChildIndent = DarkTheme.sUnitSize;
|
||||
public float mOpenButtonX = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue