mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
Merge pull request #15559 from Game4all/fix-setting-header-text-overflow
Fix settings header localised text potentially overflowing out of the settings panel
This commit is contained in:
commit
f208a931b8
@ -6,7 +6,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Overlays.Settings
|
||||
{
|
||||
@ -29,36 +29,26 @@ namespace osu.Game.Overlays.Settings
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new FillFlowContainer
|
||||
new OsuTextFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Y,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
Padding = new MarginPadding
|
||||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = heading,
|
||||
Font = OsuFont.TorusAlternate.With(size: 40),
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Left = SettingsPanel.CONTENT_MARGINS,
|
||||
Top = Toolbar.Toolbar.TOOLTIP_HEIGHT
|
||||
},
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Colour = colourProvider.Content2,
|
||||
Text = subheading,
|
||||
Font = OsuFont.GetFont(size: 18),
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Left = SettingsPanel.CONTENT_MARGINS,
|
||||
Bottom = 30
|
||||
},
|
||||
},
|
||||
Horizontal = SettingsPanel.CONTENT_MARGINS,
|
||||
Top = Toolbar.Toolbar.TOOLTIP_HEIGHT,
|
||||
Bottom = 30
|
||||
}
|
||||
}
|
||||
}.With(flow =>
|
||||
{
|
||||
flow.AddText(heading, header => header.Font = OsuFont.TorusAlternate.With(size: 40));
|
||||
flow.NewLine();
|
||||
flow.AddText(subheading, subheader =>
|
||||
{
|
||||
subheader.Colour = colourProvider.Content2;
|
||||
subheader.Font = OsuFont.GetFont(size: 18);
|
||||
});
|
||||
})
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user