1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 21:27:24 +08:00

Add right padding according to right detail shear

This commit is contained in:
Joseph Madamba 2023-06-13 13:58:58 -07:00
parent 2a3f2ff122
commit 05bdc92426
2 changed files with 10 additions and 3 deletions

View File

@ -136,6 +136,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
Padding = new MarginPadding
{
Left = 20,
Right = DrawableRoomParticipantsList.SHEAR_WIDTH,
Vertical = 5
},
Children = new Drawable[]

View File

@ -24,8 +24,14 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
{
public partial class DrawableRoomParticipantsList : OnlinePlayComposite
{
public const float SHEAR_WIDTH = 12f;
private const float avatar_size = 36;
private const float height = 60f;
private static readonly Vector2 shear = new Vector2(SHEAR_WIDTH / height, 0);
private FillFlowContainer<CircularAvatar> avatarFlow;
private CircularAvatar hostAvatar;
@ -36,7 +42,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
public DrawableRoomParticipantsList()
{
AutoSizeAxes = Axes.X;
Height = 60;
Height = height;
}
[BackgroundDependencyLoader]
@ -49,7 +55,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
RelativeSizeAxes = Axes.Both,
Masking = true,
CornerRadius = 10,
Shear = new Vector2(0.2f, 0),
Shear = shear,
Child = new Box
{
RelativeSizeAxes = Axes.Both,
@ -98,7 +104,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
RelativeSizeAxes = Axes.Both,
Masking = true,
CornerRadius = 10,
Shear = new Vector2(0.2f, 0),
Shear = shear,
Child = new Box
{
RelativeSizeAxes = Axes.Both,