1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-24 11:30:17 +08:00
Files
osu-lazer/osu.Game/Screens/Edit/Compose/Components/EditorInspector.cs
T
Dean Herbert 8fe63ade31 Adjust padding and text size in editor inspector (#36843)
It was taking up way too much vertical space previously.

I'm using the same font specs that are in the new dropdown header, which
seem to work quite well. Negative padding because without it everything
is way too vertically sparse.

Why? I was looking at [this
discussion](https://github.com/ppy/osu/discussions/36708) and like "we
need to have SV visible here" but there's really not much room with all
this text in the way.
2026-03-06 19:32:19 +09:00

50 lines
1.5 KiB
C#

// 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 osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Overlays;
namespace osu.Game.Screens.Edit.Compose.Components
{
public partial class EditorInspector : CompositeDrawable
{
protected OsuTextFlowContainer InspectorText = null!;
[Resolved]
protected EditorBeatmap EditorBeatmap { get; private set; } = null!;
[Resolved]
private OverlayColourProvider colourProvider { get; set; } = null!;
[BackgroundDependencyLoader]
private void load()
{
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
InternalChild = InspectorText = new OsuTextFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
};
}
protected void AddHeader(string header) => InspectorText.AddParagraph($"{header}: ", s =>
{
s.Font = OsuFont.Style.Caption1;
s.Colour = colourProvider.Content2;
});
protected void AddValue(string value) => InspectorText.AddParagraph(value, s =>
{
s.Padding = new MarginPadding { Top = -5 };
s.Font = OsuFont.Style.Body;
s.Colour = colourProvider.Content1;
});
}
}