-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[01] Refactoring UI code #2274
[01] Refactoring UI code #2274
Conversation
…L String & Add more Theming Options
Rename the name of an element from 'CheckboxFilterClear' to 'SearchBarClearButton' and renamed style from 'ClearButtonStyle' to 'SearchBarClearButtonStyle'
… & Make new Theming Property called 'SearchBarClearButtonFontSize'
Rename the name of an element from 'CheckboxFilter' to 'SearchBar'.. although after some realization.. the naming might make sense at first, because it filters only the checkboxes.. but CheckBoxFilter is less "Intutive" when saying it compared to "SearchBar".. _This's my own opinion, and it can reverted easily with git if needed._
…kbox Removed it as it only takes up space in the right side of the Toggle Button/Checkbox, as well as making it difficult to correctly align it when change from/to 'On' & 'Off' Text,
… Private Function Increase the Side Margins of Toggle Button/Checkbox, as well as Change its side to be on the Left hand-side of the Label, rather then the Right hand-side.
The toggle on the left looks so nice and clean and also solves the problem of negative space while it was on the right. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @og-mrk!
I generally like the changed you've made and how you implemented most of them.
Change Request
I suggested another way of implementing the buttonwidth into the json since you're not sure if that is the way to go. I personally find it better in terms of maintainability and more compact, but a bit less easy to understand for new contributers so idk..
I like the Preference Toggles, I once also changed the positioning of the toggle like that but it was overwritten by another PR that redesigned it, Thanks :)
Making the UI elements smaller in general is a good Idea thinking about how much the Toolbox has grown.
@@ -184,90 +184,104 @@ | |||
"category": "Features", | |||
"panel": "1", | |||
"Order": "a060_", | |||
"Type": "150" | |||
"Type": "Button", | |||
"ButtonWidth": "300" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [TEMPORARY FIX] Add optional 'ButtonWidth' Field to Config Json Files that use 'Button' Type. ( commit 4741319 )
meaning no more un-clear"Type": "SOME-VALUE-HERE"
kind of way of handling Button Widths.. but I still don't know if this's the best approach to solving this problem.
Understand the "Issue". I would suggest using arrays, like following:
"WPFFixesUpdate": {
"Content": "Reset Windows Update",
"category": "Fixes",
"panel": "1",
"Order": "a041_",
"Type": ["Button", "300"]
},
The first item is always the type, the ones afterwards are the "attributes" if the type.
If a button should be created but does not have a width value, it could set a default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big Changes, but I love a lot of these tweaks as it as a lot of polish to the GUI and maintainability. I'm going to test this some more, but overall I approve.
@og-mrk Please dm me ASAP |
Some Background
This PR is the first of a series of PRs on updating the UI of WinUtil. This can be considered a response to the Progress Tracking Issue Ticket #2226
Note
This PR is a big one, and I don't know if it'll be accepted or not.. but here goes nothing 🤷.
Also, I've left
Allow edits and access to secrets to maintainers
checked on, meaning @ChrisTitusTech can change the files in the PR and push them in a new commit onto my own branch (The git branch this PR is based on).Showcase of the changes
Highlights
Get-TabXaml
Private Function so it can be more maintainable, Updated its Docs, and made the Generated XML Code be more readable using Tabs. ( commits acd4d71 , d897b1d , 640d28a , 892f59a , ebfdaaf )On
&Off
Text next to the Toggle. ( commits 74cf8f0 , 3d3748d )Show-CustomDialog
Function to have more options/parameters. ( commit 3254314 )meaning no more un-clear
"Type": "SOME-VALUE-HERE"
kind of way of handling Button Widths.. but I still don't know if this's the best approach to solving this problem.Additional Info
The font size for everything, the Margins for checkboxes, the font family, and more.. all of these can be changed through the
themes.json
file, so if you don't like how WinUtil looks in this PR changes.. then it's relatively easy to change.theme.json
File.winutil.ps1
as Admin & see your changes.Note
Currently WinUtil doesn't use any Math Solver library, meaning I can't make the values of attributes in other elements be based of a value used elsewhere, plus do some math on it (Addition & Subtraction works.. most of the time, Multiplication & Division is outright, not supported in WPF attributes).
So.. things like MicroWin Checkboxs having Custom Margins, as I've changed the Checkbox Margins in
themes.json
file. ( commit 2342f81 )A negative value for the margins is used.. because we want these Checkbox in MicroWin Tab to push it to the left side, makes a bit of sense if you did HTML & CSS before).