fix alpha value in disabled state

This commit is contained in:
OliBomby 2024-06-19 20:59:14 +02:00
parent ce4567f87b
commit d5397a2139
1 changed files with 6 additions and 1 deletions

View File

@ -119,9 +119,14 @@ protected override void LoadComplete()
Expanded.BindValueChanged(v =>
{
label.Text = v.NewValue ? expandedLabelText : contractedLabelText;
slider.FadeTo(v.NewValue ? 1f : 0f, 500, Easing.OutQuint);
slider.FadeTo(v.NewValue ? Current.Disabled ? 0.3f : 1f : 0f, 500, Easing.OutQuint);
slider.BypassAutoSizeAxes = !v.NewValue ? Axes.Y : Axes.None;
}, true);
Current.BindDisabledChanged(disabled =>
{
slider.Alpha = Expanded.Value ? disabled ? 0.3f : 1 : 0f;
});
}
}