mirror of
https://github.com/ppy/osu.git
synced 2026-06-06 13:54:26 +08:00
Merge pull request #32418 from bdach/text-flow-why-do-you-torment-me-so
Fix miscellaneous text flow container breakage
This commit is contained in:
@@ -27,7 +27,7 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
private partial class ArbitraryDrawableWrapper : Container, IHasLineBaseHeight
|
||||
{
|
||||
public float LineBaseHeight => DrawHeight;
|
||||
public float LineBaseHeight => (Child as IHasLineBaseHeight)?.LineBaseHeight ?? DrawHeight;
|
||||
|
||||
public ArbitraryDrawableWrapper()
|
||||
{
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Extensions.LocalisationExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
@@ -19,7 +22,7 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Comments
|
||||
{
|
||||
public partial class CommentReportButton : CompositeDrawable, IHasPopover
|
||||
public partial class CommentReportButton : CompositeDrawable, IHasPopover, IHasLineBaseHeight
|
||||
{
|
||||
private readonly Comment comment;
|
||||
|
||||
@@ -88,5 +91,7 @@ namespace osu.Game.Overlays.Comments
|
||||
|
||||
api.Queue(request);
|
||||
}
|
||||
|
||||
public float LineBaseHeight => link.ChildrenOfType<IHasLineBaseHeight>().FirstOrDefault()?.LineBaseHeight ?? DrawHeight;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,12 +107,7 @@ namespace osu.Game.Overlays.MedalSplash
|
||||
},
|
||||
};
|
||||
|
||||
description.AddText(medal.Description, s =>
|
||||
{
|
||||
s.Anchor = Anchor.TopCentre;
|
||||
s.Origin = Anchor.TopCentre;
|
||||
s.Font = s.Font.With(size: 16);
|
||||
});
|
||||
description.AddText(medal.Description, s => s.Font = s.Font.With(size: 16));
|
||||
|
||||
medalContainer.OnLoadComplete += _ =>
|
||||
{
|
||||
|
||||
@@ -100,7 +100,6 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
t.Padding = new MarginPadding { Left = 5, Top = 1 };
|
||||
t.Font = t.Font.With(size: font_size);
|
||||
t.Origin = Anchor.Centre;
|
||||
t.Colour = colours.Pink;
|
||||
|
||||
Schedule(() =>
|
||||
|
||||
Reference in New Issue
Block a user