mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 17:32:54 +08:00
Standardise corner radius of dropdowns
This commit is contained in:
parent
1943883b9f
commit
2b4e2d8ed6
@ -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[]
|
||||
|
Loading…
Reference in New Issue
Block a user