mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-09 17:41:14 +10:00
Replace install progress overlay with shared indicator (#4844)
* Use shared progress for app workflows * Remove legacy install progress overlay * Document shared app progress indicator * Address progress review feedback * Track all Win11 ISO progress * Restore Win11 Creator work on relaunch
This commit is contained in:
@@ -39,14 +39,12 @@ function Invoke-WPFtweaksbutton {
|
||||
Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" }
|
||||
}
|
||||
|
||||
Set-WinUtilProgressBar -Label "Creating restore point" -Percent 0
|
||||
Set-WinUtilTweaksProgressIndicator -Visible $true -Label "Creating restore point" -Percent 0
|
||||
Write-WinUtilLog -Component "Tweaks" -Message "Creating restore point before applying selected tweaks."
|
||||
Invoke-WinUtilTweaks $restorePointTweak
|
||||
$completedSteps = 1
|
||||
|
||||
if ($tweaksToRun.Count -eq 0 -and $dnsProvider -eq "Default") {
|
||||
Set-WinUtilProgressBar -Label "Tweaks finished" -Percent 100
|
||||
Set-WinUtilTweaksProgressIndicator -Visible $true -Label "Tweaks finished" -Percent 100
|
||||
$sync.ProcessRunning = $false
|
||||
Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" }
|
||||
@@ -77,14 +75,12 @@ function Invoke-WPFtweaksbutton {
|
||||
}
|
||||
|
||||
for ($i = 0; $i -lt $tweaks.Count; $i++) {
|
||||
Set-WinUtilProgressBar -Label "Applying $($tweaks[$i])" -Percent ($completedSteps / $totalSteps * 100)
|
||||
Set-WinUtilTweaksProgressIndicator -Visible $true -Label "Applying $($tweaks[$i]) ($($completedSteps + 1)/$totalSteps)" -Percent ($completedSteps / $totalSteps * 100)
|
||||
Invoke-WinUtilTweaks $tweaks[$i]
|
||||
$completedSteps++
|
||||
$progress = $completedSteps / $totalSteps
|
||||
Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -value $progress }
|
||||
}
|
||||
Set-WinUtilProgressBar -Label "Tweaks finished" -Percent 100
|
||||
Set-WinUtilTweaksProgressIndicator -Visible $true -Label "Tweaks finished" -Percent 100
|
||||
$sync.ProcessRunning = $false
|
||||
Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" }
|
||||
|
||||
Reference in New Issue
Block a user