Fix badge state regressions from tab control usage

This commit is contained in:
Dean Herbert
2019-05-22 23:44:37 +09:00
parent b588638740
commit 66f5dbaa9f
2 changed files with 79 additions and 64 deletions

View File

@ -14,9 +14,6 @@ namespace osu.Game.Overlays.Changelog
{
public class UpdateStreamBadgeArea : TabControl<APIUpdateStream>
{
private const float vertical_padding = 20;
private const float horizontal_padding = 85;
public UpdateStreamBadgeArea()
{
RelativeSizeAxes = Axes.X;
@ -65,8 +62,8 @@ namespace osu.Game.Overlays.Changelog
flow.AllowMultiline = true;
flow.Padding = new MarginPadding
{
Vertical = vertical_padding,
Horizontal = horizontal_padding,
Vertical = 20,
Horizontal = 85,
};
return flow;
@ -75,6 +72,6 @@ namespace osu.Game.Overlays.Changelog
protected override Dropdown<APIUpdateStream> CreateDropdown() => null;
protected override TabItem<APIUpdateStream> CreateTabItem(APIUpdateStream value) =>
new UpdateStreamBadge(value);
new UpdateStreamBadge(value) { SelectedTab = { BindTarget = Current } };
}
}