From d5c2e65a32c50ef953df13faa5543906c796baff Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Tue, 12 Dec 2023 21:22:54 +0300 Subject: [PATCH] Enforce centre-left anchor/origin on placeholder text --- osu.Framework/Graphics/UserInterface/TextBox.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Framework/Graphics/UserInterface/TextBox.cs b/osu.Framework/Graphics/UserInterface/TextBox.cs index 4f92c9612c..d0331a5a24 100644 --- a/osu.Framework/Graphics/UserInterface/TextBox.cs +++ b/osu.Framework/Graphics/UserInterface/TextBox.cs @@ -169,7 +169,11 @@ protected TextBox() Position = new Vector2(LeftRightPadding, 0), Children = new Drawable[] { - Placeholder = CreatePlaceholder(), + Placeholder = CreatePlaceholder().With(p => + { + p.Anchor = Anchor.CentreLeft; + p.Origin = Anchor.CentreLeft; + }), caret = CreateCaret().With(c => { c.Anchor = Anchor.CentreLeft;