Fix servers in servers list in launcher on OSX/Linux not being clipped properly.

This commit is contained in:
UnknownShadow200 2015-12-28 08:34:07 +11:00
parent f03148555e
commit f1b0ce972c

View file

@ -46,6 +46,8 @@ namespace ClassicalSharp {
GetTextParts( args.Text );
Brush shadowBrush = GetOrCreateBrush( Color.Black );
StringFormatFlags flags = format.FormatFlags;
format.FormatFlags |= StringFormatFlags.NoWrap;
format.Trimming = StringTrimming.EllipsisCharacter;
float textX = x;
@ -61,6 +63,7 @@ namespace ClassicalSharp {
textX += g.MeasureString( part.Text, args.Font, Int32.MaxValue, format ).Width;
}
format.Trimming = StringTrimming.None;
format.FormatFlags = flags;
}
public override void DrawBitmappedText( ref DrawTextArgs args, int x, int y ) {