From 20769f66a1db676910ee0252f49fc72aa2f789b9 Mon Sep 17 00:00:00 2001 From: Martin Wiethan <47688561+Marterich@users.noreply.github.com> Date: Wed, 16 Apr 2025 15:40:43 +0200 Subject: [PATCH 1/4] Switch default mode to compact view (#3327) --- scripts/main.ps1 | 25 +++++++++++++------------ scripts/start.ps1 | 1 + 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index c341f200..55ec05d6 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -132,9 +132,6 @@ Invoke-WPFUIElements -configVariable $sync.configs.appnavigation -targetGridName $sync.WPFToggleView.Add_Click({ $sync.CompactView = -not $sync.CompactView Update-AppTileProperties - if ($sync.SearchBar.Text -eq "") { - Set-CategoryVisibility -Category "*" - } }) Invoke-WPFUIApps -Apps $sync.configs.applicationsHashtable -targetGridName "appspanel" @@ -197,7 +194,6 @@ $sync.keys | ForEach-Object { # Load computer information in the background Invoke-WPFRunspace -ScriptBlock { try { - $oldProgressPreference = $ProgressPreference $ProgressPreference = "SilentlyContinue" $sync.ConfigLoaded = $False $sync.ComputerInfo = Get-ComputerInfo @@ -215,12 +211,6 @@ Invoke-WPFRunspace -ScriptBlock { # Print the logo 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 { if ($sync.CompactView -eq $true) { $sync.Form.Resources.AppTileWidth = [double]::NaN @@ -229,14 +219,25 @@ function Update-AppTileProperties { $sync.Form.Resources.AppTileMargins = [Windows.Thickness]2 $sync.Form.Resources.AppTileBorderThickness = [Windows.Thickness]0 } - else { - $sync.Form.Resources.AppTileWidth = $sync.ItemsControl.ActualWidth -20 + else { + # 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.AppTileFontSize = [double]16 $sync.Form.Resources.AppTileMargins = [Windows.Thickness]5 $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) $sync.Form.Add_SizeChanged({ Update-AppTileProperties diff --git a/scripts/start.ps1 b/scripts/start.ps1 index 209eb952..e9290cac 100644 --- a/scripts/start.ps1 +++ b/scripts/start.ps1 @@ -42,6 +42,7 @@ $sync.ProcessRunning = $false $sync.selectedApps = [System.Collections.Generic.List[string]]::new() $sync.ShowOnlySeleced = $false $sync.currentTab = "Install" +$sync.CompactView = $true $sync.ShowOnlySelected = $false $sync.selectedAppsStackPanel $sync.selectedAppsPopup From 963c0a17aab096d3c29394adf845fdcf471904f6 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Wed, 16 Apr 2025 08:56:22 -0500 Subject: [PATCH 2/4] Tidy up preference file changes --- functions/private/Set-PackageManagerPreference.ps1 | 14 ++++++-------- scripts/main.ps1 | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/functions/private/Set-PackageManagerPreference.ps1 b/functions/private/Set-PackageManagerPreference.ps1 index 9b4fedc9..2754c097 100644 --- a/functions/private/Set-PackageManagerPreference.ps1 +++ b/functions/private/Set-PackageManagerPreference.ps1 @@ -24,18 +24,16 @@ function Set-PackageManagerPreference { $preferedPackageManager = [PackageManagers]::Choco Remove-Item -Path $oldChocoPath } - else { + elseif (Test-Path -Path $preferencePath) { $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 Write-Debug "Manager Preference changed to '$($sync["ManagerPreference"])'" diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 55ec05d6..31c48f99 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -219,7 +219,7 @@ function Update-AppTileProperties { $sync.Form.Resources.AppTileMargins = [Windows.Thickness]2 $sync.Form.Resources.AppTileBorderThickness = [Windows.Thickness]0 } - else { + else { # 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} From f770642a6a325f5f790c634c715ab64e3016ebad Mon Sep 17 00:00:00 2001 From: Martin Wiethan <47688561+Marterich@users.noreply.github.com> Date: Wed, 16 Apr 2025 17:13:05 +0200 Subject: [PATCH 3/4] Fix Gimp Winget Package (#3311) --- config/applications.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/applications.json b/config/applications.json index a77c3d49..faf9d4d8 100644 --- a/config/applications.json +++ b/config/applications.json @@ -701,7 +701,7 @@ "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.", "link": "https://www.gimp.org/", - "winget": "GIMP.GIMP" + "winget": "GIMP.GIMP.3" }, "git": { "category": "Development", From 48f1c715840477fdb024268c2db857d9e023621b Mon Sep 17 00:00:00 2001 From: CodingWonders <101426328+CodingWonders@users.noreply.github.com> Date: Wed, 16 Apr 2025 17:16:27 +0200 Subject: [PATCH 4/4] [Tweaks] Remove trailing commas at the end (#3326) --- config/tweaks.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/tweaks.json b/config/tweaks.json index 02f10f65..fcbe6fa2 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -3812,6 +3812,6 @@ Write-Host Please sign out and back in, or restart your computer to apply the changes! " - ], - }, + ] + } }