mirror of
https://github.com/ppy/osu
synced 2025-01-31 10:22:02 +00:00
Move common width definition to base class
This commit is contained in:
parent
f96f7e696d
commit
44671ad9cb
@ -29,6 +29,7 @@ namespace osu.Game.Overlays.Direct
|
||||
|
||||
public DirectGridPanel(BeatmapSetInfo beatmap) : base(beatmap)
|
||||
{
|
||||
Width = 400;
|
||||
Height = 140 + vertical_padding; //full height of all the elements plus vertical padding (autosize uses the image)
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ namespace osu.Game.Overlays
|
||||
switch (displayStyle)
|
||||
{
|
||||
case PanelDisplayStyle.Grid:
|
||||
return new DirectGridPanel(b) { Width = 400 };
|
||||
return new DirectGridPanel(b);
|
||||
default:
|
||||
return new DirectListPanel(b);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
|
||||
if (!s.OnlineBeatmapSetID.HasValue)
|
||||
continue;
|
||||
|
||||
var panel = new DirectGridPanel(s.ToBeatmapSet(Rulesets)) { Width = 400 };
|
||||
var panel = new DirectGridPanel(s.ToBeatmapSet(Rulesets));
|
||||
ItemsContainer.Add(panel);
|
||||
|
||||
panel.PreviewPlaying.ValueChanged += isPlaying =>
|
||||
|
Loading…
Reference in New Issue
Block a user