Skip to content

Commit

Permalink
Add hover effect for the app tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Marterich committed Oct 26, 2024
1 parent 79fb48e commit 402082b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/themes.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
},
"Light": {
"AppInstallUnselectedColor": "#F0F0F0",
"AppInstallHighlightedColor": "#CFCFCF",
"AppInstallSelectedColor": "#C2C2C2",
"ComboBoxForegroundColor": "#232629",
"ComboBoxBackgroundColor": "#F7F7F7",
Expand Down Expand Up @@ -76,6 +77,7 @@
},
"Dark": {
"AppInstallUnselectedColor": "#232629",
"AppInstallHighlightedColor": "#3C3C3C",
"AppInstallSelectedColor": "#4C4C4C",
"ComboBoxForegroundColor": "#F7F7F7",
"ComboBoxBackgroundColor": "#1E3747",
Expand Down
10 changes: 10 additions & 0 deletions functions/public/Invoke-WPFUIApps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,16 @@ function Invoke-WPFUIApps {
$childCheckbox = ($this.Child.Children | Where-Object {$_.Template.TargetType -eq [System.Windows.Controls.Checkbox]})[0]
$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
$dockPanel = New-Object Windows.Controls.DockPanel
$dockPanel.LastChildFill = $true
Expand Down

0 comments on commit 402082b

Please sign in to comment.