fix unlock button text disappearing when pointer is over it, closes #2

This commit is contained in:
2025-12-12 00:06:37 +03:00
parent f2e9dc7285
commit 2c592b48d5

View File

@@ -92,7 +92,12 @@
<DataTemplate DataType="{x:Type vm:LockedRepositoryViewModel}"> <DataTemplate DataType="{x:Type vm:LockedRepositoryViewModel}">
<StackPanel Margin="20" <StackPanel Margin="20"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center"> VerticalAlignment="Center"
Spacing="10">
<TextBlock Text="Enter credentials to unlock"
Foreground="#2328C4"
FontSize="32" />
<TextBox x:Name="UnlockPasswordEdit" <TextBox x:Name="UnlockPasswordEdit"
Text="{Binding UnlockPassword, Mode=TwoWay}" Text="{Binding UnlockPassword, Mode=TwoWay}"
PasswordChar="*" PasswordChar="*"
@@ -102,7 +107,18 @@
Command="{Binding TryUnlock}" Command="{Binding TryUnlock}"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Foreground="Black" Foreground="Black"
Background="#aaa"
Content="Unlock!" /> Content="Unlock!" />
<StackPanel.Styles>
<Style Selector="Button /template/ ContentPresenter">
<Setter Property="Foreground" Value="#333" />
</Style>
<Style Selector="Button:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="#ccc" />
<Setter Property="Foreground" Value="#444" />
</Style>
</StackPanel.Styles>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</Window.DataTemplates> </Window.DataTemplates>