Add hover effect for the app tiles

This commit is contained in:
Marterich 2024-10-26 21:00:34 +02:00
parent 79fb48e4df
commit 402082b376
2 changed files with 12 additions and 0 deletions

View File

@ -39,6 +39,7 @@
}, },
"Light": { "Light": {
"AppInstallUnselectedColor": "#F0F0F0", "AppInstallUnselectedColor": "#F0F0F0",
"AppInstallHighlightedColor": "#CFCFCF",
"AppInstallSelectedColor": "#C2C2C2", "AppInstallSelectedColor": "#C2C2C2",
"ComboBoxForegroundColor": "#232629", "ComboBoxForegroundColor": "#232629",
"ComboBoxBackgroundColor": "#F7F7F7", "ComboBoxBackgroundColor": "#F7F7F7",
@ -76,6 +77,7 @@
}, },
"Dark": { "Dark": {
"AppInstallUnselectedColor": "#232629", "AppInstallUnselectedColor": "#232629",
"AppInstallHighlightedColor": "#3C3C3C",
"AppInstallSelectedColor": "#4C4C4C", "AppInstallSelectedColor": "#4C4C4C",
"ComboBoxForegroundColor": "#F7F7F7", "ComboBoxForegroundColor": "#F7F7F7",
"ComboBoxBackgroundColor": "#1E3747", "ComboBoxBackgroundColor": "#1E3747",

View File

@ -314,6 +314,16 @@ function Invoke-WPFUIApps {
$childCheckbox = ($this.Child.Children | Where-Object {$_.Template.TargetType -eq [System.Windows.Controls.Checkbox]})[0] $childCheckbox = ($this.Child.Children | Where-Object {$_.Template.TargetType -eq [System.Windows.Controls.Checkbox]})[0]
$childCheckBox.isChecked = -not $childCheckbox.IsChecked $childCheckBox.isChecked = -not $childCheckbox.IsChecked
}) })
$border.Add_MouseEnter({
if (($sync.$($this.Tag).IsChecked) -eq $false){
$this.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "AppInstallHighlightedColor")
}
})
$border.Add_MouseLeave({
if (($sync.$($this.Tag).IsChecked) -eq $false){
$this.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "AppInstallUnselectedColor")
}
})
# Create a DockPanel inside the Border # Create a DockPanel inside the Border
$dockPanel = New-Object Windows.Controls.DockPanel $dockPanel = New-Object Windows.Controls.DockPanel
$dockPanel.LastChildFill = $true $dockPanel.LastChildFill = $true