mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 17:27:48 +08:00
Add padding around text in dialogs
This commit is contained in:
parent
28e220ca50
commit
f8347288c1
@ -92,6 +92,30 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
AddUntilStep("first dialog is not part of hierarchy", () => firstDialog.Parent == null);
|
AddUntilStep("first dialog is not part of hierarchy", () => firstDialog.Parent == null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestTooMuchText()
|
||||||
|
{
|
||||||
|
AddStep("dialog #1", () => overlay.Push(new TestPopupDialog
|
||||||
|
{
|
||||||
|
Icon = FontAwesome.Regular.TrashAlt,
|
||||||
|
HeaderText = @"Confirm deletion ofConfirm deletion ofConfirm deletion ofConfirm deletion ofConfirm deletion ofConfirm deletion of",
|
||||||
|
BodyText = @"Ayase Rie - Yuima-ru*World TVver.Ayase Rie - Yuima-ru*World TVver.Ayase Rie - Yuima-ru*World TVver.Ayase Rie - Yuima-ru*World TVver.Ayase Rie - Yuima-ru*World TVver.Ayase Rie - Yuima-ru*World TVver.Ayase Rie - Yuima-ru*World TVver.Ayase Rie - Yuima-ru*World TVver.Ayase Rie - Yuima-ru*World TVver. ",
|
||||||
|
Buttons = new PopupDialogButton[]
|
||||||
|
{
|
||||||
|
new PopupDialogOkButton
|
||||||
|
{
|
||||||
|
Text = @"I never want to see this again.",
|
||||||
|
Action = () => Console.WriteLine(@"OK"),
|
||||||
|
},
|
||||||
|
new PopupDialogCancelButton
|
||||||
|
{
|
||||||
|
Text = @"Firetruck, I still want quick ranks!",
|
||||||
|
Action = () => Console.WriteLine(@"Cancel"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestPushBeforeLoad()
|
public void TestPushBeforeLoad()
|
||||||
{
|
{
|
||||||
|
@ -210,6 +210,7 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
TextAnchor = Anchor.TopCentre,
|
TextAnchor = Anchor.TopCentre,
|
||||||
|
Padding = new MarginPadding { Horizontal = 5 },
|
||||||
},
|
},
|
||||||
body = new OsuTextFlowContainer(t => t.Font = t.Font.With(size: 18))
|
body = new OsuTextFlowContainer(t => t.Font = t.Font.With(size: 18))
|
||||||
{
|
{
|
||||||
@ -218,6 +219,7 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
TextAnchor = Anchor.TopCentre,
|
TextAnchor = Anchor.TopCentre,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Padding = new MarginPadding { Horizontal = 5 },
|
||||||
},
|
},
|
||||||
buttonsContainer = new FillFlowContainer<PopupDialogButton>
|
buttonsContainer = new FillFlowContainer<PopupDialogButton>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user