mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 18:07:25 +08:00
Add right padding according to right detail shear
This commit is contained in:
parent
2a3f2ff122
commit
05bdc92426
@ -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[]
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user