Fix comment editor text boxes not having sound feedback

This commit is contained in:
Joseph Madamba 2023-01-21 17:08:42 -08:00
parent 292fd345bc
commit da03abc812
3 changed files with 7 additions and 10 deletions

View File

@ -262,7 +262,7 @@ public void TestReport()
AddAssert("Nothing happened", () => this.ChildrenOfType<ReportCommentPopover>().Any());
AddStep("Set report data", () =>
{
var field = this.ChildrenOfType<OsuTextBox>().Single();
var field = this.ChildrenOfType<ReportCommentPopover>().Single().ChildrenOfType<OsuTextBox>().Single();
field.Current.Value = report_text;
var reason = this.ChildrenOfType<OsuEnumDropdown<CommentReportReason>>().Single();
reason.Current.Value = CommentReportReason.Other;

View File

@ -250,13 +250,16 @@ protected override void OnImeResult(string result, bool successful)
protected override void OnFocus(FocusEvent e)
{
BorderThickness = 3;
if (Masking)
BorderThickness = 3;
base.OnFocus(e);
}
protected override void OnFocusLost(FocusLostEvent e)
{
BorderThickness = 0;
if (Masking)
BorderThickness = 0;
base.OnFocusLost(e);
}

View File

@ -147,7 +147,7 @@ protected override void LoadComplete()
private void updateCommitButtonState() =>
commitButton.Enabled.Value = loadingSpinner.State.Value == Visibility.Hidden && !string.IsNullOrEmpty(Current.Value);
private partial class EditorTextBox : BasicTextBox
private partial class EditorTextBox : OsuTextBox
{
protected override float LeftRightPadding => side_padding;
@ -173,12 +173,6 @@ private void load(OverlayColourProvider colourProvider)
{
Font = OsuFont.GetFont(weight: FontWeight.Regular),
};
protected override Drawable GetDrawableCharacter(char c) => new FallingDownContainer
{
AutoSizeAxes = Axes.Both,
Child = new OsuSpriteText { Text = c.ToString(), Font = OsuFont.GetFont(size: CalculatedTextSize) }
};
}
protected partial class EditorButton : RoundedButton