mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Merge pull request #513 from BDisp/text-alignment
Fixes Label text alignment.
This commit is contained in:
@@ -183,13 +183,13 @@ namespace Terminal.Gui {
|
||||
break;
|
||||
case TextAlignment.Justified:
|
||||
Recalc ();
|
||||
x = Frame.Left;
|
||||
x = Bounds.Left;
|
||||
break;
|
||||
case TextAlignment.Right:
|
||||
x = Frame.Right - str.Length;
|
||||
x = Bounds.Right - str.Length;
|
||||
break;
|
||||
case TextAlignment.Centered:
|
||||
x = Frame.Left + (Frame.Width - str.Length) / 2;
|
||||
x = Bounds.Left + (Bounds.Width - str.Length) / 2;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException ();
|
||||
|
||||
Reference in New Issue
Block a user