Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mod preset tooltip's description text being cut off #29166

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions osu.Game/Overlays/Mods/ModPresetRow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public ModPresetRow(Mod mod)
{
new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(7),
Children = new Drawable[]
Expand Down
13 changes: 8 additions & 5 deletions osu.Game/Overlays/Mods/ModPresetTooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public partial class ModPresetTooltip : VisibilityContainer, ITooltip<ModPreset>

public ModPresetTooltip(OverlayColourProvider colourProvider)
{
Width = 250;
AutoSizeAxes = Axes.Y;
AutoSizeAxes = Axes.Both;

Masking = true;
CornerRadius = 7;
Expand All @@ -38,8 +37,8 @@ public ModPresetTooltip(OverlayColourProvider colourProvider)
},
Content = new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
Padding = new MarginPadding { Left = 10, Right = 10, Top = 5, Bottom = 5 },
Spacing = new Vector2(7),
Children = new[]
Expand All @@ -66,7 +65,11 @@ public void SetContent(ModPreset preset)
lastPreset = preset;

Content.RemoveAll(d => d is ModPresetRow, true);
Content.AddRange(preset.Mods.AsOrdered().Select(mod => new ModPresetRow(mod)));
Content.AddRange(preset.Mods.AsOrdered().Select(mod => new ModPresetRow(mod)
{
RelativeSizeAxes = Axes.None,
AutoSizeAxes = Axes.Both,
}));
}

protected override void PopIn() => this.FadeIn(transition_duration, Easing.OutQuint);
Expand Down
Loading