mirror of
https://github.com/ppy/osu.git
synced 2025-01-29 05:52:56 +08:00
Merge pull request #27278 from EVAST9919/grid-update
Apply padding to `GridContainer`s directly where possible
This commit is contained in:
commit
9c40ff2911
@ -66,13 +66,10 @@ namespace osu.Game.Overlays.Chat.ChannelList
|
|||||||
Colour = colourProvider.Background4,
|
Colour = colourProvider.Background4,
|
||||||
Alpha = 0f,
|
Alpha = 0f,
|
||||||
},
|
},
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Left = 18, Right = 10 },
|
Padding = new MarginPadding { Left = 18, Right = 10 },
|
||||||
Child = new GridContainer
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
ColumnDimensions = new[]
|
ColumnDimensions = new[]
|
||||||
{
|
{
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
@ -98,9 +95,8 @@ namespace osu.Game.Overlays.Chat.ChannelList
|
|||||||
createMentionPill(),
|
createMentionPill(),
|
||||||
close = createCloseButton(),
|
close = createCloseButton(),
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Action = () => OnRequestSelect?.Invoke(Channel);
|
Action = () => OnRequestSelect?.Invoke(Channel);
|
||||||
|
@ -26,15 +26,11 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colourProvider.Background5,
|
Colour = colourProvider.Background5,
|
||||||
},
|
},
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Padding = new MarginPadding { Horizontal = WaveOverlayContainer.HORIZONTAL_PADDING, Vertical = 10 },
|
Padding = new MarginPadding { Horizontal = WaveOverlayContainer.HORIZONTAL_PADDING, Vertical = 10 },
|
||||||
Child = new GridContainer
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
RowDimensions = new[]
|
RowDimensions = new[]
|
||||||
{
|
{
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
@ -70,7 +66,6 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,10 +47,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colourProvider.Background4,
|
Colour = colourProvider.Background4,
|
||||||
},
|
},
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Child = new GridContainer
|
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
ColumnDimensions = new[]
|
ColumnDimensions = new[]
|
||||||
@ -75,7 +72,6 @@ namespace osu.Game.Screens.Edit
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -86,10 +86,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colourProvider.Background3
|
Colour = colourProvider.Background3
|
||||||
},
|
},
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Child = new GridContainer
|
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Content = new[]
|
Content = new[]
|
||||||
@ -118,19 +115,10 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new Container
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Child = new GridContainer
|
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Content = new[]
|
Content = new[]
|
||||||
@ -157,9 +145,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
new Dimension(GridSizeMode.Absolute, 20)
|
new Dimension(GridSizeMode.Absolute, 20)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
|
@ -57,16 +57,12 @@ namespace osu.Game.Screens.Edit
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colourProvider.Background4
|
Colour = colourProvider.Background4
|
||||||
},
|
},
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
Name = "Timeline content",
|
Name = "Timeline content",
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Padding = new MarginPadding { Horizontal = PADDING, Top = PADDING },
|
Padding = new MarginPadding { Horizontal = PADDING, Top = PADDING },
|
||||||
Child = new GridContainer
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
Content = new[]
|
Content = new[]
|
||||||
{
|
{
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
@ -87,7 +83,6 @@ namespace osu.Game.Screens.Edit
|
|||||||
new Dimension(),
|
new Dimension(),
|
||||||
new Dimension(GridSizeMode.Absolute, 90),
|
new Dimension(GridSizeMode.Absolute, 90),
|
||||||
}
|
}
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -64,16 +64,11 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
Content = new[]
|
Content = new[]
|
||||||
{
|
{
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
|
||||||
new Container
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Padding = new MarginPadding(padding),
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
{
|
||||||
new GridContainer
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Padding = new MarginPadding(padding),
|
||||||
ColumnDimensions = new[]
|
ColumnDimensions = new[]
|
||||||
{
|
{
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
@ -92,8 +87,6 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
|
@ -34,9 +34,6 @@ namespace osu.Game.Screens.Edit.Verify
|
|||||||
InterpretedDifficulty.Default = StarDifficulty.GetDifficultyRating(EditorBeatmap.BeatmapInfo.StarRating);
|
InterpretedDifficulty.Default = StarDifficulty.GetDifficultyRating(EditorBeatmap.BeatmapInfo.StarRating);
|
||||||
InterpretedDifficulty.SetDefault();
|
InterpretedDifficulty.SetDefault();
|
||||||
|
|
||||||
Child = new Container
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Child = new GridContainer
|
Child = new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -53,7 +50,6 @@ namespace osu.Game.Screens.Edit.Verify
|
|||||||
new IssueSettings(),
|
new IssueSettings(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,18 +26,15 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
|||||||
[Resolved(typeof(Room))]
|
[Resolved(typeof(Room))]
|
||||||
protected BindableList<PlaylistItem> Playlist { get; private set; }
|
protected BindableList<PlaylistItem> Playlist { get; private set; }
|
||||||
|
|
||||||
private readonly Drawable playlistArea;
|
private readonly GridContainer playlistArea;
|
||||||
private readonly DrawableRoomPlaylist playlist;
|
private readonly DrawableRoomPlaylist playlist;
|
||||||
|
|
||||||
public MatchBeatmapDetailArea()
|
public MatchBeatmapDetailArea()
|
||||||
{
|
{
|
||||||
Add(playlistArea = new Container
|
Add(playlistArea = new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Vertical = 10 },
|
Padding = new MarginPadding { Vertical = 10 },
|
||||||
Child = new GridContainer
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Content = new[]
|
Content = new[]
|
||||||
{
|
{
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
@ -68,7 +65,6 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
|||||||
new Dimension(),
|
new Dimension(),
|
||||||
new Dimension(GridSizeMode.Absolute, 50),
|
new Dimension(GridSizeMode.Absolute, 50),
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,15 +40,12 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
Alpha = 0.5f
|
Alpha = 0.5f
|
||||||
},
|
},
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Horizontal = padding },
|
Padding = new MarginPadding { Horizontal = padding },
|
||||||
Child = new GridContainer
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
ColumnDimensions = new[]
|
ColumnDimensions = new[]
|
||||||
{
|
{
|
||||||
new Dimension(GridSizeMode.AutoSize, minSize: 80 - 2 * padding)
|
new Dimension(GridSizeMode.AutoSize, minSize: 80 - 2 * padding)
|
||||||
@ -74,7 +71,6 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,13 +95,10 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
// Playlist items column
|
// Playlist items column
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Right = 5 },
|
Padding = new MarginPadding { Right = 5 },
|
||||||
Child = new GridContainer
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Content = new[]
|
Content = new[]
|
||||||
{
|
{
|
||||||
new Drawable[] { new OverlinedPlaylistHeader(), },
|
new Drawable[] { new OverlinedPlaylistHeader(), },
|
||||||
@ -127,7 +124,6 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
new Dimension(GridSizeMode.AutoSize),
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
new Dimension(),
|
new Dimension(),
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// Spacer
|
// Spacer
|
||||||
null,
|
null,
|
||||||
|
@ -150,13 +150,10 @@ namespace osu.Game.Screens.Ranking.Contracted
|
|||||||
},
|
},
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new Container
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Vertical = 5 },
|
Padding = new MarginPadding { Vertical = 5 },
|
||||||
Child = new GridContainer
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Content = new[]
|
Content = new[]
|
||||||
{
|
{
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
@ -189,7 +186,6 @@ namespace osu.Game.Screens.Ranking.Contracted
|
|||||||
new Dimension(GridSizeMode.AutoSize),
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
RowDimensions = new[]
|
RowDimensions = new[]
|
||||||
|
@ -75,15 +75,10 @@ namespace osu.Game.Screens.Select
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = Colour4.Black.Opacity(0.3f),
|
Colour = Colour4.Black.Opacity(0.3f),
|
||||||
},
|
},
|
||||||
new Container
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Padding = new MarginPadding { Horizontal = spacing },
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new GridContainer
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Padding = new MarginPadding { Horizontal = spacing },
|
||||||
RowDimensions = new[]
|
RowDimensions = new[]
|
||||||
{
|
{
|
||||||
new Dimension(GridSizeMode.AutoSize),
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
@ -167,8 +162,6 @@ namespace osu.Game.Screens.Select
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
|
||||||
},
|
|
||||||
loading = new LoadingLayer(true)
|
loading = new LoadingLayer(true)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user