mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:13:22 +08:00
Refactor to detail the sizing mode setting
This commit is contained in:
parent
ec73e8f0c7
commit
17b669fdf7
@ -104,15 +104,13 @@ namespace osu.Game.Screens.Multi.Components
|
||||
new Dimension(AutoSizeAxes.HasFlag(Axes.Y) ? GridSizeMode.AutoSize : GridSizeMode.Distributed),
|
||||
};
|
||||
|
||||
grid.AutoSizeAxes = Axes.None;
|
||||
grid.RelativeSizeAxes = Axes.None;
|
||||
grid.AutoSizeAxes = AutoSizeAxes;
|
||||
grid.RelativeSizeAxes = ~AutoSizeAxes;
|
||||
// Assigning to none is done so that setting auto and relative size modes doesn't cause exceptions to be thrown
|
||||
grid.AutoSizeAxes = Content.AutoSizeAxes = Axes.None;
|
||||
grid.RelativeSizeAxes = Content.RelativeSizeAxes = Axes.None;
|
||||
|
||||
Content.AutoSizeAxes = Axes.None;
|
||||
Content.RelativeSizeAxes = Axes.None;
|
||||
Content.AutoSizeAxes = grid.AutoSizeAxes;
|
||||
Content.RelativeSizeAxes = grid.RelativeSizeAxes;
|
||||
// Auto-size when required, otherwise eagerly relative-size
|
||||
grid.AutoSizeAxes = Content.AutoSizeAxes = AutoSizeAxes;
|
||||
grid.RelativeSizeAxes = Content.RelativeSizeAxes = ~AutoSizeAxes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user