Compare commits

...

10 Commits

Author SHA1 Message Date
9ce598fbeb Updated Python Version to Latest (#3509)
Updated the list so that Python 3.13 is installed instead of Python 3.12
2025-08-01 11:35:39 -05:00
965d9e0394 Add scaling functionality for accessibility (#3505) 2025-08-01 11:34:00 -05:00
2b9e277b10 minor fixes 2025-08-01 11:29:10 -05:00
5144551b52 Update to Razer tweak + comments updates (#3482)
* Update to Razer tweak + comments updates

* Add hyphen for Wi-Fi
2025-08-01 10:58:46 -05:00
91ab12dd7f [Tweaks] Cross Device Resume (#3480) 2025-08-01 10:56:22 -05:00
fdee2ea898 Updates to the "Disable Telemetry" tweak (#3465)
* Updates to the "Disable Telemetry" tweak

* Update OriginalValue for DeliveryOptimization policy
2025-08-01 10:55:04 -05:00
5ebd27da7e [Toggle] add New Outlook Toggle (#3439)
* add WPFToggleNewOutlook

* fix link

---------

Co-authored-by: Chris Titus <contact@christitus.com>
2025-08-01 10:48:18 -05:00
f6030eec0b add WPFToggleMultiplaneOverlay Toggle (#3438) 2025-08-01 10:42:18 -05:00
9403b95067 [Legacy Panel] TIMEDATE (#3432)
* add TIMEDATE.cpl Panel

* Fix standardization

---------

Co-authored-by: Chris Titus <contact@christitus.com>
Co-authored-by: Chris Titus Tech <dfm.titus@gmail.com>
2025-08-01 10:40:35 -05:00
cdd43f5e36 Fixing the Credentials system. (#3390)
* Checks if password exists for the user, if it doesn't the user is prompted to create one.

It checks if the password is equal to $null using `ValidateCredentials` and if it isn't the variable will be created. If it is equal to $null, a window with text, a textbox and a button will appear asking the user to create a password. That password is then set for the user and the winget installation continues.

* Made this a little more secure

Securing the password variable when it gets created and deleting it after it's done being used.

* Forces the user to input their password and automatically puts their username into the credentials box

* Removed the second greater than 0 check
2025-08-01 10:13:33 -05:00
10 changed files with 384 additions and 96 deletions

View File

@ -1741,7 +1741,7 @@
"content": "Python3",
"description": "Python is a versatile programming language used for web development, data analysis, artificial intelligence, and more.",
"link": "https://www.python.org/",
"winget": "Python.Python.3.12"
"winget": "Python.Python.3.13"
},
"qbittorrent": {
"category": "Utilities",

View File

@ -242,15 +242,7 @@
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/fixes/runadobecccleanertool"
},
"WPFPanelnetwork": {
"Content": "Network Connections",
"category": "Legacy Windows Panels",
"panel": "2",
"Type": "Button",
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/network"
},
"WPFPanelcontrol": {
"WPFPanelControl": {
"Content": "Control Panel",
"category": "Legacy Windows Panels",
"panel": "2",
@ -258,7 +250,7 @@
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/control"
},
"WPFPanelcomputer": {
"WPFPanelComputer": {
"Content": "Computer Management",
"category": "Legacy Windows Panels",
"panel": "2",
@ -266,7 +258,15 @@
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/computer"
},
"WPFPanelpower": {
"WPFPanelNetwork": {
"Content": "Network Connections",
"category": "Legacy Windows Panels",
"panel": "2",
"Type": "Button",
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/network"
},
"WPFPanelPower": {
"Content": "Power Panel",
"category": "Legacy Windows Panels",
"panel": "2",
@ -274,23 +274,7 @@
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/power"
},
"WPFPanelregion": {
"Content": "Region",
"category": "Legacy Windows Panels",
"panel": "2",
"Type": "Button",
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/region"
},
"WPFPanelsound": {
"Content": "Sound Settings",
"category": "Legacy Windows Panels",
"panel": "2",
"Type": "Button",
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/sound"
},
"WPFPanelprinter": {
"WPFPanelPrinter": {
"Content": "Printer Panel",
"category": "Legacy Windows Panels",
"panel": "2",
@ -298,7 +282,24 @@
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/printer"
},
"WPFPanelsystem": {
"WPFPanelRegion": {
"Content": "Region",
"category": "Legacy Windows Panels",
"panel": "2",
"Type": "Button",
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/region"
},
"WPFPanelSound": {
"Content": "Sound Settings",
"category": "Legacy Windows Panels",
"panel": "2",
"Type": "Button",
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/user"
},
"WPFPanelSystem": {
"Content": "System Properties",
"category": "Legacy Windows Panels",
"panel": "2",
@ -306,20 +307,13 @@
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/system"
},
"WPFPaneluser": {
"Content": "User Accounts",
"WPFPanelTimedate": {
"Content": "Time and Date",
"category": "Legacy Windows Panels",
"panel": "2",
"Type": "Button",
"ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/user"
},
"WPFPanelGodMode": {
"Content": "God Mode",
"category": "Legacy Windows Panels",
"panel": "2",
"Type": "Button",
"ButtonWidth": "300"
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/timedate"
},
"WPFWinUtilInstallPSProfile": {
"Content": "Install CTT PowerShell Profile",

View File

@ -1824,10 +1824,10 @@
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\DataCollection",
"Type": "DWord",
"Value": "0",
"OriginalValue": "<RemoveEntry>",
"Name": "AllowTelemetry",
"OriginalValue": "<RemoveEntry>"
"Value": "0",
"Type": "DWord"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection",
@ -1913,6 +1913,13 @@
"Value": "0",
"Type": "DWord"
},
{
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Siuf\\Rules",
"OriginalValue": "<RemoveEntry>",
"Name": "PeriodInNanoSeconds",
"Value": "<RemoveEntry>",
"Type": "QWord"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection",
"OriginalValue": "<RemoveEntry>",
@ -1945,7 +1952,14 @@
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DeliveryOptimization\\Config",
"OriginalValue": "1",
"Name": "DODownloadMode",
"Value": "1",
"Value": "0",
"Type": "DWord"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DeliveryOptimization",
"OriginalValue": "<RemoveEntry>",
"Name": "DODownloadMode",
"Value": "0",
"Type": "DWord"
},
{
@ -1990,14 +2004,6 @@
"Value": "1",
"Type": "DWord"
},
{
"_Comment": "Driver searching is a function that should be left in",
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching",
"OriginalValue": "1",
"Name": "SearchOrderConfig",
"Value": "1",
"Type": "DWord"
},
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile",
"OriginalValue": "1",
@ -2107,8 +2113,8 @@
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/tele"
},
"WPFTweaksWifi": {
"Content": "Disable Wifi-Sense",
"Description": "Wifi Sense is a spying service that phones home all nearby scanned wifi networks and your current geo location.",
"Content": "Disable Wi-Fi Sense",
"Description": "Wi-Fi Sense is a spying service that phones home all nearby scanned Wi-Fi networks and your current geographic location.",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a005_",
@ -2148,8 +2154,8 @@
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/utc"
},
"WPFTweaksRemoveHome": {
"Content": "Remove Home from explorer",
"Description": "Removes the Home from explorer and sets This PC as default",
"Content": "Remove Home from Explorer",
"Description": "Removes the Home from Explorer and sets This PC as default",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a029_",
@ -2169,7 +2175,7 @@
},
"WPFTweaksRemoveGallery": {
"Content": "Remove Gallery from explorer",
"Description": "Removes the Gallery from explorer and sets This PC as default",
"Description": "Removes the Gallery from Explorer and sets This PC as default",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a030_",
@ -2777,7 +2783,7 @@
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$OneDrivePath\"
}
Write-Host \"Remove Onedrive from explorer sidebar\"
Write-Host \"Remove Onedrive from Explorer sidebar\"
Set-ItemProperty -Path \"HKCR:\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
Set-ItemProperty -Path \"HKCR:\\Wow6432Node\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
@ -2823,7 +2829,7 @@
taskkill.exe /F /IM \"explorer.exe\"
Start-Process \"explorer.exe\"
Write-Host \"Waiting for explorer to complete loading\"
Write-Host \"Waiting for Explorer to complete loading\"
Write-Host \"Please Note - The OneDrive folder at $OneDrivePath may still have items in it. You must manually delete it, but all the files should already be copied to the base user folder.\"
Write-Host \"If there are Files missing afterwards, please Login to Onedrive.com and Download them manually\" -ForegroundColor Yellow
Start-Sleep 5
@ -2842,7 +2848,7 @@
},
"WPFTweaksRazerBlock": {
"Content": "Block Razer Software Installs",
"Description": "Blocks ALL Razer Software installations. The hardware works fine without any software.",
"Description": "Blocks ALL Razer Software installations. The hardware works fine without any software. WARNING: this will also block all Windows third-party driver installations.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a032_",
@ -3646,6 +3652,69 @@
],
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/stickykeys"
},
"WPFToggleNewOutlook": {
"Content": "New Outlook",
"Description": "If disabled it removes the toggle for new Outlook, disables the new Outlook migration and makes sure the Outlook Application actually uses the old Outlook.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a112_",
"Type": "Toggle",
"registry": [
{
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Office\\16.0\\Outlook\\Preferences",
"Name": "UseNewOutlook",
"Value": "1",
"OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord"
},
{
"Path": "HKCU:\\Software\\Microsoft\\Office\\16.0\\Outlook\\Options\\General",
"Name": "HideNewOutlookToggle",
"Value": "0",
"OriginalValue": "1",
"DefaultState": "true",
"Type": "DWord"
},
{
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Office\\16.0\\Outlook\\Options\\General",
"Name": "DoNewOutlookAutoMigration",
"Value": "0",
"OriginalValue": "0",
"DefaultState": "false",
"Type": "DWord"
},
{
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Office\\16.0\\Outlook\\Preferences",
"Name": "NewOutlookMigrationUserSetting",
"Value": "0",
"OriginalValue": "<RemoveEntry>",
"DefaultState": "true",
"Type": "DWord"
}
],
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/newoutlook"
},
"WPFToggleMultiplaneOverlay": {
"Content": "Multiplane Overlay",
"Description": "Disable the Multiplane Overlay which can sometimes cause issues with Graphics Cards.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a111_",
"Type": "Toggle",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Dwm",
"Name": "OverlayTestMode",
"Value": "5",
"OriginalValue": "<RemoveEntry>",
"DefaultState": "true",
"Type": "DWord"
}
],
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/multplaneoverlay"
},
"WPFToggleHiddenFiles": {
"Content": "Show Hidden Files",
"Description": "If Enabled then Hidden Files will be shown.",
@ -3874,7 +3943,7 @@
# Folder types lookup table
$bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\"
# Flush explorer view database
# Flush Explorer view database
Remove-Item -Path $bags -Recurse -Force
Write-Host \"Removed $bags\"
@ -3904,7 +3973,7 @@
# Folder types lookup table
$bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\"
# Flush explorer view database
# Flush Explorer view database
Remove-Item -Path $bags -Recurse -Force
Write-Host \"Removed $bags\"
@ -3914,5 +3983,23 @@
Write-Host Please sign out and back in, or restart your computer to apply the changes!
"
]
},
"WPFTweaksDisableCrossDeviceResume": {
"Content": "Cross-Device Resume",
"Description": "This tweak controls the Resume function in Windows 11 24H2 and later, which allows you to resume an activity from a mobile device and vice-versa.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a207_",
"Type": "Toggle",
"registry": [
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\CrossDeviceResume\\Configuration",
"Name": "IsResumeAllowed",
"Value": "1",
"OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord"
}
]
}
}

View File

@ -97,9 +97,9 @@ Function Install-WinUtilProgramWinget {
return $true
}
$userChoice = [System.Windows.MessageBox]::Show("Do you want to attempt $($Program) installation with specific user credentials? Select 'Yes' to proceed or 'No' to skip.", "User credential Prompt", [System.Windows.MessageBoxButton]::YesNo)
if ($userChoice -eq 'Yes') {
$getcreds = Get-Credential
$userAcknowledgment = [System.Windows.MessageBox]::Show("You need to input your password to install $($Program) with specific user credentials.", "User credential Prompt", [System.Windows.MessageBoxButton]::Ok)
if ($userAcknowledgment -eq 'Ok') {
$getcreds = Get-Credential $env:USERNAME
$status = Invoke-Winget -wingetId $Program -credential $getcreds
if ($status -eq 0) {
Write-Host "$($Program) installed successfully with User prompt."

View File

@ -0,0 +1,72 @@
function Invoke-WinUtilFontScaling {
<#
.SYNOPSIS
Applies UI and font scaling for accessibility
.PARAMETER ScaleFactor
Sets the scaling from 0.75 and 2.0.
Default is 1.0 (100% - no scaling)
.EXAMPLE
Invoke-WinUtilFontScaling -ScaleFactor 1.25
# Applies 125% scaling
#>
param (
[double]$ScaleFactor = 1.0
)
# Validate if scale factor is within the range
if ($ScaleFactor -lt 0.75 -or $ScaleFactor -gt 2.0) {
Write-Warning "Scale factor must be between 0.75 and 2.0. Using 1.0 instead."
$ScaleFactor = 1.0
}
# Define an array for resources to be scaled
$fontResources = @(
"FontSize",
"ButtonFontSize",
"HeaderFontSize",
"TabButtonFontSize",
"IconFontSize",
"SettingsIconFontSize",
"CloseIconFontSize",
"AppEntryFontSize",
"SearchBarTextBoxFontSize",
"SearchBarClearButtonFontSize",
"CustomDialogFontSize",
"CustomDialogFontSizeHeader",
"ConfigUpdateButtonFontSize",
"CheckBoxBulletDecoratorSize"
)
# Apply scaling to each resource
foreach ($resourceName in $fontResources) {
try {
# Get the default font size from the theme configuration
$originalValue = $sync.configs.themes.shared.$resourceName
if ($originalValue) {
# Convert string to double since values are stored as strings
$originalValue = [double]$originalValue
# Calculates and applies the new font size
$newValue = [math]::Round($originalValue * $ScaleFactor, 1)
$sync.Form.Resources[$resourceName] = $newValue
Write-Debug "Scaled $resourceName from original $originalValue to $newValue (factor: $ScaleFactor)"
}
}
catch {
Write-Warning "Failed to scale resource $resourceName : $_"
}
}
# Update the font scaling percentage displayed on the UI
if ($sync.FontScalingValue) {
$percentage = [math]::Round($ScaleFactor * 100)
$sync.FontScalingValue.Text = "$percentage%"
}
Write-Debug "Font scaling applied with factor: $ScaleFactor"
}

View File

@ -35,16 +35,16 @@ function Invoke-WPFButton {
"WPFFeatureInstall" {Invoke-WPFFeatureInstall}
"WPFPanelDISM" {Invoke-WPFSystemRepair}
"WPFPanelAutologin" {Invoke-WPFPanelAutologin}
"WPFPanelcomputer" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelcontrol" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelnetwork" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelpower" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelregion" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelsound" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelprinter" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelsystem" {Invoke-WPFControlPanel -Panel $button}
"WPFPaneluser" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelGodMode" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelComputer" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelControl" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelNetwork" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelPower" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelPrinter" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelRegion" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelSound" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelSystem" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelTimedate" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelUser" {Invoke-WPFControlPanel -Panel $button}
"WPFUpdatesdefault" {Invoke-WPFFixesUpdate}
"WPFFixesUpdate" {Invoke-WPFFixesUpdate}
"WPFFixesWinget" {Invoke-WPFFixesWinget}

View File

@ -11,15 +11,15 @@ function Invoke-WPFControlPanel {
param($Panel)
switch ($Panel) {
"WPFPanelcontrol" {control}
"WPFPanelcomputer" {compmgmt.msc}
"WPFPanelnetwork" {ncpa.cpl}
"WPFPanelpower" {powercfg.cpl}
"WPFPanelregion" {intl.cpl}
"WPFPanelsound" {mmsys.cpl}
"WPFPanelprinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"}
"WPFPanelsystem" {sysdm.cpl}
"WPFPaneluser" {control userpasswords2}
"WPFPanelGodMode" {Start-Process "shell:::{ED7BA470-8E54-465E-825C-99712043E01C}"}
"WPFPanelControl" {control}
"WPFPanelComputer" {compmgmt.msc}
"WPFPanelNetwork" {ncpa.cpl}
"WPFPanelPower" {powercfg.cpl}
"WPFPanelPrinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"}
"WPFPanelRegion" {intl.cpl}
"WPFPanelSound" {mmsys.cpl}
"WPFPanelSystem" {sysdm.cpl}
"WPFPanelTimedate" {timedate.cpl}
"WPFPanelUser" {control userpasswords2}
}
}

View File

@ -4,10 +4,8 @@ function Invoke-WPFInstall {
[PSObject[]]$PackagesToInstall = $($sync.selectedApps | Foreach-Object { $sync.configs.applicationsHashtable.$_ })
)
<#
.SYNOPSIS
Installs the selected programs using winget, if one or more of the selected programs are already installed on the system, winget will try and perform an upgrade if there's a newer version to install.
#>
if($sync.ProcessRunning) {
@ -34,12 +32,55 @@ function Invoke-WPFInstall {
try {
$sync.ProcessRunning = $true
Show-WPFInstallAppBusy -text "Installing apps..."
if($packagesWinget.Count -gt 0 -and $packagesWinget -ne "0") {
Add-Type -AssemblyName System.DirectoryServices.AccountManagement
Add-Type -assembly System.Windows.Forms
$PrincipalContext = New-Object System.DirectoryServices.AccountManagement.PrincipalContext('Machine')
$user = $env:USERNAME
if($packagesWinget.Count -gt 0) {
Get-LocalUser | Where-Object Enabled -eq $true | ForEach-Object {
try {
$myPasswordIsBlank = $PrincipalContext.ValidateCredentials($user, $null)
} catch {
$form = New-Object System.Windows.Forms.Form
$form.Text = "Set password for $user"
$form.Size = New-Object System.Drawing.Size(500, 200)
$label = New-Object System.Windows.Forms.Label
$label.Text = 'Maybe a program needs to be installed in "usermode" and you have no password set, you need to set it here. After putting a password into the text box a page asking for your password might open (not right after). If you keep the text box empty, nothing will happen.
REMEMBER THE PASSWORD FOR THE FUTURE. YOU WILL NEED FOR STUFF AND TO LOGIN IF AUTOLOGIN ISN`T SET'
$label.Size = New-Object System.Drawing.Size(480, 60)
$label.Location = New-Object System.Drawing.Point(10, 10)
$form.Controls.Add($label)
$passwordBox = New-Object System.Windows.Forms.TextBox
$passwordBox.Size = New-Object System.Drawing.Size(380, 20)
$passwordBox.UseSystemPasswordChar = $true
$passwordBox.Location = New-Object System.Drawing.Point(10, 125)
$form.Controls.Add($passwordBox)
$button = New-Object System.Windows.Forms.Button
$button.Text = 'Submit'
$button.Size = New-Object System.Drawing.Size(75, 23)
$button.Location = New-Object System.Drawing.Point(400, 125)
$button.Add_Click({
$password = $passwordBox.Text | ConvertTo-SecureString -AsPlainText -Force
if ($password) {
Set-LocalUser -Name $user -Password $password
$password.Close()
$Form.Close()
} else {
[System.Windows.Forms.MessageBox]::Show('No password entered!')
}
})
$form.Controls.Add($button)
$form.ShowDialog() | Out-Null
}
}
Show-WPFInstallAppBusy -text "Installing apps..."
Install-WinUtilWinget
Install-WinUtilProgramWinget -Action Install -Programs $packagesWinget
}
if($packagesChoco.Count -gt 0) {
Install-WinUtilChoco

View File

@ -261,7 +261,7 @@ $commonKeyEvents = {
$sync["Form"].Add_PreViewKeyDown($commonKeyEvents)
$sync["Form"].Add_MouseLeftButtonDown({
Invoke-WPFPopup -Action "Hide" -Popups @("Settings", "Theme")
Invoke-WPFPopup -Action "Hide" -Popups @("Settings", "Theme", "FontScaling")
$sync["Form"].DragMove()
})
@ -279,7 +279,7 @@ $sync["Form"].Add_MouseDoubleClick({
$sync["Form"].Add_Deactivated({
Write-Debug "WinUtil lost focus"
Invoke-WPFPopup -Action "Hide" -Popups @("Settings", "Theme")
Invoke-WPFPopup -Action "Hide" -Popups @("Settings", "Theme", "FontScaling")
})
$sync["Form"].Add_ContentRendered({
@ -441,7 +441,7 @@ $sync["Form"].Add_Activated({
$sync["ThemeButton"].Add_Click({
Write-Debug "ThemeButton clicked"
Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Hide"; "Theme" = "Toggle" }
Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Hide"; "Theme" = "Toggle"; "FontScaling" = "Hide" }
})
$sync["AutoThemeMenuItem"].Add_Click({
Write-Debug "About clicked"
@ -461,7 +461,7 @@ $sync["LightThemeMenuItem"].Add_Click({
$sync["SettingsButton"].Add_Click({
Write-Debug "SettingsButton clicked"
Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Toggle"; "Theme" = "Hide" }
Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Toggle"; "Theme" = "Hide"; "FontScaling" = "Hide" }
})
$sync["ImportMenuItem"].Add_Click({
Write-Debug "Import clicked"
@ -506,5 +506,30 @@ $sync["SponsorMenuItem"].Add_Click({
Show-CustomDialog -Title "Sponsors" -Message $authorInfo -EnableScroll $true
})
# Font Scaling Event Handlers
$sync["FontScalingButton"].Add_Click({
Write-Debug "FontScalingButton clicked"
Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Hide"; "Theme" = "Hide"; "FontScaling" = "Toggle" }
})
$sync["FontScalingSlider"].Add_ValueChanged({
param($slider)
$percentage = [math]::Round($slider.Value * 100)
$sync.FontScalingValue.Text = "$percentage%"
})
$sync["FontScalingResetButton"].Add_Click({
Write-Debug "FontScalingResetButton clicked"
$sync.FontScalingSlider.Value = 1.0
$sync.FontScalingValue.Text = "100%"
})
$sync["FontScalingApplyButton"].Add_Click({
Write-Debug "FontScalingApplyButton clicked"
$scaleFactor = $sync.FontScalingSlider.Value
Invoke-WinUtilFontScaling -ScaleFactor $scaleFactor
Invoke-WPFPopup -Action "Hide" -Popups @("FontScaling")
})
$sync["Form"].ShowDialog() | out-null
Stop-Transcript

View File

@ -948,6 +948,7 @@
<ColumnDefinition Width="Auto"/><!-- Space for close button -->
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/><!-- Space for Font Scaling button-->
</Grid.ColumnDefinitions>
<!--
@ -1032,7 +1033,7 @@
</Border>
</Popup>
<Button Name="SettingsButton"
<Button Name="FontScalingButton"
Style="{StaticResource HoverButtonStyle}"
Grid.Column="3" BorderBrush="Transparent"
Background="{DynamicResource MainBackgroundColor}"
@ -1040,6 +1041,74 @@
FontSize="{DynamicResource SettingsIconFontSize}"
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="0,5,5,0"
FontFamily="Segoe MDL2 Assets"
Content="&#xE8D3;"
ToolTip="Adjust Font Scaling for Accessibility"
/>
<Popup Grid.Column="3" Name="FontScalingPopup"
IsOpen="False"
PlacementTarget="{Binding ElementName=FontScalingButton}" Placement="Bottom"
HorizontalAlignment="Right" VerticalAlignment="Top">
<Border Background="{DynamicResource MainBackgroundColor}" BorderBrush="{DynamicResource MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0">
<StackPanel Background="{DynamicResource MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinWidth="200">
<TextBlock Text="Font Scaling"
FontSize="{DynamicResource ButtonFontSize}"
Foreground="{DynamicResource MainForegroundColor}"
HorizontalAlignment="Center"
Margin="10,5,10,5"
FontWeight="Bold"/>
<Separator Margin="5,0,5,5"/>
<StackPanel Orientation="Horizontal" Margin="10,5,10,10">
<TextBlock Text="Small"
FontSize="{DynamicResource ButtonFontSize}"
Foreground="{DynamicResource MainForegroundColor}"
VerticalAlignment="Center"
Margin="0,0,10,0"/>
<Slider Name="FontScalingSlider"
Minimum="0.75" Maximum="2.0"
Value="1.0"
TickFrequency="0.25"
TickPlacement="BottomRight"
IsSnapToTickEnabled="True"
Width="120"
VerticalAlignment="Center"/>
<TextBlock Text="Large"
FontSize="{DynamicResource ButtonFontSize}"
Foreground="{DynamicResource MainForegroundColor}"
VerticalAlignment="Center"
Margin="10,0,0,0"/>
</StackPanel>
<TextBlock Name="FontScalingValue"
Text="100%"
FontSize="{DynamicResource ButtonFontSize}"
Foreground="{DynamicResource MainForegroundColor}"
HorizontalAlignment="Center"
Margin="10,0,10,5"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="10,0,10,10">
<Button Name="FontScalingResetButton"
Content="Reset"
Style="{StaticResource HoverButtonStyle}"
Width="60" Height="25"
Margin="5,0,5,0"/>
<Button Name="FontScalingApplyButton"
Content="Apply"
Style="{StaticResource HoverButtonStyle}"
Width="60" Height="25"
Margin="5,0,5,0"/>
</StackPanel>
</StackPanel>
</Border>
</Popup>
<Button Name="SettingsButton"
Style="{StaticResource HoverButtonStyle}"
Grid.Column="4" BorderBrush="Transparent"
Background="{DynamicResource MainBackgroundColor}"
Foreground="{DynamicResource MainForegroundColor}"
FontSize="{DynamicResource SettingsIconFontSize}"
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="5,5,5,0"
FontFamily="Segoe MDL2 Assets"
Content="&#xE713;"/>
@ -1067,7 +1136,7 @@
</Popup>
<Button
Grid.Column="4"
Grid.Column="5"
Content="&#xD7;" BorderThickness="0"
BorderBrush="Transparent"
Background="{DynamicResource MainBackgroundColor}"