sync fork & remove merge issues

This commit is contained in:
MyDrift
2024-09-20 21:50:24 +02:00
parent f92088bc81
commit dd64f06b89
14 changed files with 693 additions and 641 deletions

View File

@ -19,7 +19,6 @@ function Invoke-WPFButton {
}
Switch -Wildcard ($Button) {
"WPFTab?BT" {Invoke-WPFTab $Button}
"WPFInstall" {Invoke-WPFInstall}
"WPFUninstall" {Invoke-WPFUnInstall}

View File

@ -27,7 +27,7 @@ function Invoke-WPFUIElements {
$window = $sync["Form"]
$theme = $sync.configs.themes.$ctttheme
$theme = $sync.Form.Resources
$borderstyle = $window.FindResource("BorderStyle")
$HoverTextBlockStyle = $window.FindResource("HoverTextBlockStyle")
$ColorfulToggleSwitchStyle = $window.FindResource("ColorfulToggleSwitchStyle")
@ -186,7 +186,7 @@ function Invoke-WPFUIElements {
$label.ToolTip = $entryInfo.Description
$label.HorizontalAlignment = "Left"
$label.FontSize = $theme.FontSize
$label.Foreground = $theme.MainForegroundColor
$label.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "MainForegroundColor")
$dockPanel.Children.Add($label) | Out-Null
$stackPanel.Children.Add($dockPanel) | Out-Null
@ -207,14 +207,14 @@ function Invoke-WPFUIElements {
$toggleButton.HorizontalAlignment = "Left"
$toggleButton.Height = $theme.TabButtonHeight
$toggleButton.Width = $theme.TabButtonWidth
$toggleButton.Background = $theme.ButtonInstallBackgroundColor
$toggleButton.Foreground = [Windows.Media.Brushes]::White
$toggleButton.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "ButtonInstallBackgroundColor")
$toggleButton.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "MainForegroundColor")
$toggleButton.FontWeight = [Windows.FontWeights]::Bold
$textBlock = New-Object Windows.Controls.TextBlock
$textBlock.FontSize = $theme.TabButtonFontSize
$textBlock.Background = [Windows.Media.Brushes]::Transparent
$textBlock.Foreground = $theme.ButtonInstallForegroundColor
$textBlock.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "ButtonInstallForegroundColor")
$underline = New-Object Windows.Documents.Underline
$underline.Inlines.Add($entryInfo.name -replace "(.).*", "`$1")

View File

@ -50,14 +50,14 @@ Function Invoke-WPFUltimatePerformance {
} elseif ($State -eq "Disable") {
# Check if the Ultimate Performance plan is installed by GUID
$installedPlan = powercfg -list | Select-String -Pattern $ultimateGUID
$installedPlan = (powercfg -list | Select-String -Pattern "ChrisTitus - Ultimate Power Plan").Line.Split()[3]
if ($installedPlan) {
# Extract the GUID of the installed Ultimate Performance plan
$ultimatePlanGUID = $installedPlan.Line.Split()[3]
# Set a different power plan as active before deleting the Ultimate Performance plan
$balancedPlanGUID = (powercfg -list | Select-String -Pattern "Balanced").Line.Split()[3]
$balancedPlanGUID = 381b4222-f694-41f0-9685-ff5bb260df2e
powercfg -setactive $balancedPlanGUID
# Delete the Ultimate Performance plan by GUID