Compare commits

...

9 Commits

Author SHA1 Message Date
MyDrift
71db68ad8e fix rectangle 2024-08-22 22:34:55 +02:00
MyDrift
f7e100d14a remove grid to make it look correctly on small window 2024-08-22 22:19:14 +02:00
MyDrift
1f6e5b8f92 add padding & margin to make search look good 2024-08-22 21:51:23 +02:00
MyDrift
cb2576e6db fixed accidental removal of findname grid call 2024-08-22 21:22:13 +02:00
MyDrift
f284173767 fix throw exception 2024-08-22 21:18:51 +02:00
MyDrift
7e3d124a24 add error handling 2024-08-22 19:35:02 +02:00
MyDrift
20dc45bc27 move run & undo tweaks to be fixed 2024-08-22 19:15:56 +02:00
MyDrift
7b42f7b039 fix search 2024-08-22 19:08:31 +02:00
MyDrift
23f11d36fe remove dispatcher 2024-08-22 18:56:12 +02:00
5 changed files with 23 additions and 34 deletions

View File

@ -48,7 +48,7 @@
"SearchBarWidth": "200",
"SearchBarHeight": "25",
"SearchBarTextBoxFontSize": "16",
"SearchBarTextBoxFontSize": "12",
"SearchBarClearButtonFontSize": "14",
"ButtonInstallBackgroundColor": "#FFFFFF",
@ -122,7 +122,7 @@
"SearchBarWidth": "200",
"SearchBarHeight": "25",
"SearchBarTextBoxFontSize": "16",
"SearchBarTextBoxFontSize": "12",
"SearchBarClearButtonFontSize": "14",
"ButtonInstallBackgroundColor": "#222222",
@ -195,7 +195,7 @@
"SearchBarWidth": "200",
"SearchBarHeight": "25",
"SearchBarTextBoxFontSize": "16",
"SearchBarTextBoxFontSize": "12",
"SearchBarClearButtonFontSize": "14",
"ButtonInstallBackgroundColor": "#222222",

View File

@ -3382,22 +3382,6 @@
"ComboItems": "Default DHCP Google Cloudflare Cloudflare_Malware Cloudflare_Malware_Adult Open_DNS Quad9 AdGuard_Ads_Trackers AdGuard_Ads_Trackers_Malware_Adult",
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns"
},
"WPFTweaksbutton": {
"Content": "Run Tweaks",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a041_",
"Type": "Button",
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/button"
},
"WPFUndoall": {
"Content": "Undo Selected Tweaks",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a042_",
"Type": "Button",
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/Undoall"
},
"WPFAddUltPerf": {
"Content": "Add and Activate Ultimate Performance Profile",
"category": "Performance Plans",

View File

@ -31,13 +31,17 @@ function Invoke-WPFUIElements {
$borderstyle = $window.FindResource("BorderStyle")
$HoverTextBlockStyle = $window.FindResource("HoverTextBlockStyle")
$ColorfulToggleSwitchStyle = $window.FindResource("ColorfulToggleSwitchStyle")
if (!$borderstyle -or !$HoverTextBlockStyle -or !$ColorfulToggleSwitchStyle) {
throw "Failed to retrieve Styles using 'FindResource' from main window element."
}
$targetGrid = $window.FindName($targetGridName)
if (!$targetGrid) {
throw "Failed to retrieve Target Grid by name, provided name: $targetGrid"
}
# Clear existing ColumnDefinitions and Children
$targetGrid.ColumnDefinitions.Clear() | Out-Null
$targetGrid.Children.Clear() | Out-Null

View File

@ -84,15 +84,10 @@ try {
# Load the configuration files
#Invoke-WPFUIElements -configVariable $sync.configs.nav -targetGridName "WPFMainGrid"
$sync.form.Dispatcher.Invoke([action] {
Invoke-WPFUIElements -configVariable $sync.configs.applications -targetGridName "appspanel" -columncount 5
})
$sync.form.Dispatcher.Invoke([action] {
Invoke-WPFUIElements -configVariable $sync.configs.tweaks -targetGridName "tweakspanel" -columncount 2
})
$sync.form.Dispatcher.Invoke([action] {
Invoke-WPFUIElements -configVariable $sync.configs.feature -targetGridName "featurespanel" -columncount 2
})
Invoke-WPFUIElements -configVariable $sync.configs.applications -targetGridName "appspanel" -columncount 5
Invoke-WPFUIElements -configVariable $sync.configs.tweaks -targetGridName "tweakspanel" -columncount 2
Invoke-WPFUIElements -configVariable $sync.configs.feature -targetGridName "featurespanel" -columncount 2
#===========================================================================
# Store Form Objects In PowerShell

View File

@ -677,19 +677,19 @@
Consider using a Math Solver, will help in making
development of these things much easier
-->
<!-- Changed the font size from {SearchBarTextBoxFontSize} to 12. This now display the text box correctly in the text box.-->
<TextBox
Grid.Column="0"
Width="{SearchBarWidth}"
Height="{SearchBarHeight}"
FontSize="12"
FontSize="{SearchBarTextBoxFontSize}"
VerticalAlignment="Center" HorizontalAlignment="Left"
BorderThickness="1"
Name="SearchBar"
Foreground="{MainForegroundColor}" Background="{MainBackgroundColor}"
Padding="3,3,30,0"
Margin="5,0,0,0"
ToolTip="Press Ctrl-F and type app name to filter application list below. Press Esc to reset the filter">
</TextBox>
<!--Changed the margin from 16 to 180, which now places the magnifying glass icon on the right side of the text box. Now able to see what is been searched for.-->
<TextBlock
Grid.Column="0"
VerticalAlignment="Center" HorizontalAlignment="Left"
@ -703,7 +703,6 @@
Consider using a Math Solver, will help in making
development of these things much easier
-->
<!-- changed the {SearchBarClearButtonMargin} value from 193 to 205, which now places the clear button on the outside of the text box. -->
<Button Grid.Column="0"
VerticalAlignment="Center" HorizontalAlignment="Left"
Name="SearchBarClearButton"
@ -801,7 +800,7 @@
</Grid>
</ScrollViewer>
<Rectangle Grid.Row="1" Grid.Column="0" Width="18" Height="18" Fill="{MainBackgroundColor}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Style="{StaticResource ScrollVisibilityRectangle}"/>
<Rectangle Grid.Row="1" Grid.Column="0" Width="22" Height="22" Fill="{MainBackgroundColor}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Style="{StaticResource ScrollVisibilityRectangle}"/>
</Grid>
</TabItem>
@ -843,6 +842,13 @@
</Border>
</Grid>
</ScrollViewer>
<!-- Centered border with buttons and text -->
<Border Grid.Row="1" Background="{MainBackgroundColor}" BorderBrush="Gray" BorderThickness="1" CornerRadius="5" HorizontalAlignment="Stretch" Padding="10">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="0">
<Button Name="WPFTweaksbutton" Content="Run Tweaks" Margin="5"/>
<Button Name="WPFUndoall" Content="Undo Selected Tweaks" Margin="5"/>
</StackPanel>
</Border>
</Grid>
</TabItem>
<TabItem Header="Config" Visibility="Collapsed" Name="WPFTab3">