mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +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,
|
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user