Make text localisable and add padding constant

This commit is contained in:
sw1tchbl4d3 2022-05-27 12:36:43 +02:00
parent 7c459faaf0
commit 6a0cf26722

View File

@ -30,6 +30,7 @@ namespace osu.Game.Overlays.Dashboard
internal class CurrentlyPlayingDisplay : CompositeDrawable internal class CurrentlyPlayingDisplay : CompositeDrawable
{ {
private const float SEARCHBAR_HEIGHT = 40; private const float SEARCHBAR_HEIGHT = 40;
private const float CONTAINER_PADDING = 10;
private readonly IBindableList<int> playingUsers = new BindableList<int>(); private readonly IBindableList<int> playingUsers = new BindableList<int>();
@ -51,7 +52,7 @@ namespace osu.Game.Overlays.Dashboard
searchBarBackground = new Box searchBarBackground = new Box
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Height = 10*2 + SEARCHBAR_HEIGHT, Height = CONTAINER_PADDING * 2 + SEARCHBAR_HEIGHT,
Colour = colourProvider.Background4, Colour = colourProvider.Background4,
}; };
@ -70,7 +71,7 @@ namespace osu.Game.Overlays.Dashboard
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
PlaceholderText = "type to search", PlaceholderText = Resources.Localisation.Web.HomeStrings.SearchPlaceholder,
}, },
}; };
@ -79,7 +80,7 @@ namespace osu.Game.Overlays.Dashboard
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Padding = new MarginPadding { Padding = new MarginPadding {
Top = 10*3 + SEARCHBAR_HEIGHT, Top = CONTAINER_PADDING * 3 + SEARCHBAR_HEIGHT,
Bottom = 10, Bottom = 10,
Right = 10, Right = 10,
Left = 10, Left = 10,