Fix alignment and size of mute button (#5809)

Fix alignment and size of mute button

Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
Dean Herbert 2019-08-23 18:04:21 +09:00 committed by GitHub
commit 0a8c8906a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,16 +65,15 @@ namespace osu.Game.Overlays.Volume
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Size = new Vector2(20),
} }
}); });
Current.ValueChanged += muted => Current.BindValueChanged(muted =>
{ {
icon.Icon = muted.NewValue ? FontAwesome.Solid.VolumeMute : FontAwesome.Solid.VolumeUp; icon.Icon = muted.NewValue ? FontAwesome.Solid.VolumeMute : FontAwesome.Solid.VolumeUp;
}; icon.Size = new Vector2(muted.NewValue ? 18 : 20);
icon.Margin = new MarginPadding { Right = muted.NewValue ? 2 : 0 };
Current.TriggerChange(); }, true);
} }
protected override bool OnHover(HoverEvent e) protected override bool OnHover(HoverEvent e)