工作切换到隐藏的时候半透明按钮 fix #155

This commit is contained in:
ZouJin 2024-04-18 23:19:54 +08:00
parent 45a6f33447
commit 1ac0ab8cda
2 changed files with 3 additions and 1 deletions

View File

@ -49,7 +49,7 @@
pu:ButtonHelper.HoverBackground="{DynamicResource ButtonBackgroundHover}" /> pu:ButtonHelper.HoverBackground="{DynamicResource ButtonBackgroundHover}" />
</Grid> </Grid>
</Border> </Border>
<Button HorizontalAlignment="Left" VerticalAlignment="Top" Padding="5,5,8,7" <Button x:Name="btnSwitch" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="5,5,8,7"
Background="{DynamicResource BorderBrush}" pu:ButtonHelper.CornerRadius="5" Margin="10,10,0,0" Background="{DynamicResource BorderBrush}" pu:ButtonHelper.CornerRadius="5" Margin="10,10,0,0"
Click="SwitchState_Click"> Click="SwitchState_Click">
<Path Fill="{DynamicResource ButtonForeground}" <Path Fill="{DynamicResource ButtonForeground}"

View File

@ -144,10 +144,12 @@ namespace VPet_Simulator.Core
{ {
if (DisplayType == 3) if (DisplayType == 3)
{ {
btnSwitch.Opacity = 0.5;
DisplayBorder.Visibility = Visibility.Collapsed; DisplayBorder.Visibility = Visibility.Collapsed;
} }
else else
{ {
btnSwitch.Opacity = 1;
DisplayBorder.Visibility = Visibility.Visible; DisplayBorder.Visibility = Visibility.Visible;
btnStop.Content = LocalizeCore.Translate("停止") + m.NowWork.NameTrans; btnStop.Content = LocalizeCore.Translate("停止") + m.NowWork.NameTrans;
switch (DisplayType) switch (DisplayType)