mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-01 10:32:35 -05:00
Compare commits
4 Commits
86459b7e24
...
48f1c71584
Author | SHA1 | Date | |
---|---|---|---|
48f1c71584 | |||
f770642a6a | |||
963c0a17aa | |||
20769f66a1 |
@ -701,7 +701,7 @@
|
|||||||
"content": "GIMP (Image Editor)",
|
"content": "GIMP (Image Editor)",
|
||||||
"description": "GIMP is a versatile open-source raster graphics editor used for tasks such as photo retouching, image editing, and image composition.",
|
"description": "GIMP is a versatile open-source raster graphics editor used for tasks such as photo retouching, image editing, and image composition.",
|
||||||
"link": "https://www.gimp.org/",
|
"link": "https://www.gimp.org/",
|
||||||
"winget": "GIMP.GIMP"
|
"winget": "GIMP.GIMP.3"
|
||||||
},
|
},
|
||||||
"git": {
|
"git": {
|
||||||
"category": "Development",
|
"category": "Development",
|
||||||
|
@ -3812,6 +3812,6 @@
|
|||||||
|
|
||||||
Write-Host Please sign out and back in, or restart your computer to apply the changes!
|
Write-Host Please sign out and back in, or restart your computer to apply the changes!
|
||||||
"
|
"
|
||||||
],
|
]
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,18 +24,16 @@ function Set-PackageManagerPreference {
|
|||||||
$preferedPackageManager = [PackageManagers]::Choco
|
$preferedPackageManager = [PackageManagers]::Choco
|
||||||
Remove-Item -Path $oldChocoPath
|
Remove-Item -Path $oldChocoPath
|
||||||
}
|
}
|
||||||
else {
|
elseif (Test-Path -Path $preferencePath) {
|
||||||
$potential = Get-Content -Path $preferencePath -TotalCount 1
|
$potential = Get-Content -Path $preferencePath -TotalCount 1
|
||||||
if ($potential)
|
$preferedPackageManager = [PackageManagers]$potential
|
||||||
{$preferedPackageManager = [PackageManagers]$potential}
|
}
|
||||||
|
else {
|
||||||
|
Write-Debug "Creating new preference file, defaulting to winget."
|
||||||
|
$preferedPackageManager = [PackageManagers]::Winget
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#If no preference argument, .ini file bad read, and $sync empty then default to winget.
|
|
||||||
if ($null -eq $preferedPackageManager -and $null -eq $sync["ManagerPreference"])
|
|
||||||
{ $preferedPackageManager = [PackageManagers]::Winget }
|
|
||||||
|
|
||||||
|
|
||||||
$sync["ManagerPreference"] = [PackageManagers]::$preferedPackageManager
|
$sync["ManagerPreference"] = [PackageManagers]::$preferedPackageManager
|
||||||
Write-Debug "Manager Preference changed to '$($sync["ManagerPreference"])'"
|
Write-Debug "Manager Preference changed to '$($sync["ManagerPreference"])'"
|
||||||
|
|
||||||
|
@ -132,9 +132,6 @@ Invoke-WPFUIElements -configVariable $sync.configs.appnavigation -targetGridName
|
|||||||
$sync.WPFToggleView.Add_Click({
|
$sync.WPFToggleView.Add_Click({
|
||||||
$sync.CompactView = -not $sync.CompactView
|
$sync.CompactView = -not $sync.CompactView
|
||||||
Update-AppTileProperties
|
Update-AppTileProperties
|
||||||
if ($sync.SearchBar.Text -eq "") {
|
|
||||||
Set-CategoryVisibility -Category "*"
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
Invoke-WPFUIApps -Apps $sync.configs.applicationsHashtable -targetGridName "appspanel"
|
Invoke-WPFUIApps -Apps $sync.configs.applicationsHashtable -targetGridName "appspanel"
|
||||||
|
|
||||||
@ -197,7 +194,6 @@ $sync.keys | ForEach-Object {
|
|||||||
# Load computer information in the background
|
# Load computer information in the background
|
||||||
Invoke-WPFRunspace -ScriptBlock {
|
Invoke-WPFRunspace -ScriptBlock {
|
||||||
try {
|
try {
|
||||||
$oldProgressPreference = $ProgressPreference
|
|
||||||
$ProgressPreference = "SilentlyContinue"
|
$ProgressPreference = "SilentlyContinue"
|
||||||
$sync.ConfigLoaded = $False
|
$sync.ConfigLoaded = $False
|
||||||
$sync.ComputerInfo = Get-ComputerInfo
|
$sync.ComputerInfo = Get-ComputerInfo
|
||||||
@ -215,12 +211,6 @@ Invoke-WPFRunspace -ScriptBlock {
|
|||||||
|
|
||||||
# Print the logo
|
# Print the logo
|
||||||
Invoke-WPFFormVariables
|
Invoke-WPFFormVariables
|
||||||
$sync.CompactView = $false
|
|
||||||
$sync.Form.Resources.AppTileWidth = [double]::NaN
|
|
||||||
$sync.Form.Resources.AppTileCompactVisibility = [Windows.Visibility]::Visible
|
|
||||||
$sync.Form.Resources.AppTileFontSize = [double]16
|
|
||||||
$sync.Form.Resources.AppTileMargins = [Windows.Thickness]5
|
|
||||||
$sync.Form.Resources.AppTileBorderThickness = [Windows.Thickness]0
|
|
||||||
function Update-AppTileProperties {
|
function Update-AppTileProperties {
|
||||||
if ($sync.CompactView -eq $true) {
|
if ($sync.CompactView -eq $true) {
|
||||||
$sync.Form.Resources.AppTileWidth = [double]::NaN
|
$sync.Form.Resources.AppTileWidth = [double]::NaN
|
||||||
@ -230,13 +220,24 @@ function Update-AppTileProperties {
|
|||||||
$sync.Form.Resources.AppTileBorderThickness = [Windows.Thickness]0
|
$sync.Form.Resources.AppTileBorderThickness = [Windows.Thickness]0
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sync.Form.Resources.AppTileWidth = $sync.ItemsControl.ActualWidth -20
|
# On first load, set the AppTileWidth to NaN because the Window dosnt exist yet and there is no ActuaWidth
|
||||||
|
if ($sync.ItemsControl.ActualWidth -gt 0) {
|
||||||
|
$sync.Form.Resources.AppTileWidth = $sync.ItemsControl.ActualWidth -20}
|
||||||
|
else {
|
||||||
|
$sync.Form.Resources.AppTileWidth = [double]::NaN
|
||||||
|
}
|
||||||
$sync.Form.Resources.AppTileCompactVisibility = [Windows.Visibility]::Visible
|
$sync.Form.Resources.AppTileCompactVisibility = [Windows.Visibility]::Visible
|
||||||
$sync.Form.Resources.AppTileFontSize = [double]16
|
$sync.Form.Resources.AppTileFontSize = [double]16
|
||||||
$sync.Form.Resources.AppTileMargins = [Windows.Thickness]5
|
$sync.Form.Resources.AppTileMargins = [Windows.Thickness]5
|
||||||
$sync.Form.Resources.AppTileBorderThickness = [Windows.Thickness]1
|
$sync.Form.Resources.AppTileBorderThickness = [Windows.Thickness]1
|
||||||
}
|
}
|
||||||
|
if ($sync.SearchBar.Text -eq "") {
|
||||||
|
Set-CategoryVisibility -Category "*"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
# initialize AppTile properties
|
||||||
|
Update-AppTileProperties
|
||||||
|
|
||||||
# We need to update the app tile properties when the form is resized because to fill a WrapPanel update the width of the elemenmt manually (afaik)
|
# We need to update the app tile properties when the form is resized because to fill a WrapPanel update the width of the elemenmt manually (afaik)
|
||||||
$sync.Form.Add_SizeChanged({
|
$sync.Form.Add_SizeChanged({
|
||||||
Update-AppTileProperties
|
Update-AppTileProperties
|
||||||
|
@ -42,6 +42,7 @@ $sync.ProcessRunning = $false
|
|||||||
$sync.selectedApps = [System.Collections.Generic.List[string]]::new()
|
$sync.selectedApps = [System.Collections.Generic.List[string]]::new()
|
||||||
$sync.ShowOnlySeleced = $false
|
$sync.ShowOnlySeleced = $false
|
||||||
$sync.currentTab = "Install"
|
$sync.currentTab = "Install"
|
||||||
|
$sync.CompactView = $true
|
||||||
$sync.ShowOnlySelected = $false
|
$sync.ShowOnlySelected = $false
|
||||||
$sync.selectedAppsStackPanel
|
$sync.selectedAppsStackPanel
|
||||||
$sync.selectedAppsPopup
|
$sync.selectedAppsPopup
|
||||||
|
Reference in New Issue
Block a user