mirror of
https://github.com/ppy/osu
synced 2025-01-09 15:49:32 +00:00
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:
commit
0a8c8906a9
@ -65,16 +65,15 @@ namespace osu.Game.Overlays.Volume
|
||||
{
|
||||
Anchor = 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;
|
||||
};
|
||||
|
||||
Current.TriggerChange();
|
||||
icon.Size = new Vector2(muted.NewValue ? 18 : 20);
|
||||
icon.Margin = new MarginPadding { Right = muted.NewValue ? 2 : 0 };
|
||||
}, true);
|
||||
}
|
||||
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
|
Loading…
Reference in New Issue
Block a user