1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-22 13:45:08 +08:00

Merge pull request #10088 from peppy/dropdown-standardise-corner-radius

Round the corners of dropdowns when expanded
This commit is contained in:
Dan Balasescu 2020-09-08 19:47:00 +09:00 committed by GitHub
commit 30aefd3d7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,8 @@ namespace osu.Game.Graphics.UserInterface
{
public class OsuDropdown<T> : Dropdown<T>, IHasAccentColour
{
private const float corner_radius = 4;
private Color4 accentColour;
public Color4 AccentColour
@ -57,9 +59,11 @@ namespace osu.Game.Graphics.UserInterface
// todo: this uses the same styling as OsuMenu. hopefully we can just use OsuMenu in the future with some refactoring
public OsuDropdownMenu()
{
CornerRadius = 4;
CornerRadius = corner_radius;
BackgroundColour = Color4.Black.Opacity(0.5f);
MaskingContainer.CornerRadius = corner_radius;
// todo: this uses the same styling as OsuMenu. hopefully we can just use OsuMenu in the future with some refactoring
ItemsContainer.Padding = new MarginPadding(5);
}
@ -138,7 +142,7 @@ namespace osu.Game.Graphics.UserInterface
Foreground.Padding = new MarginPadding(2);
Masking = true;
CornerRadius = 6;
CornerRadius = corner_radius;
}
[BackgroundDependencyLoader]
@ -237,7 +241,7 @@ namespace osu.Game.Graphics.UserInterface
AutoSizeAxes = Axes.None;
Margin = new MarginPadding { Bottom = 4 };
CornerRadius = 4;
CornerRadius = corner_radius;
Height = 40;
Foreground.Children = new Drawable[]