-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Added Image Resizer Settings #2324
Added Image Resizer Settings #2324
Conversation
src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw
Outdated
Show resolved
Hide resolved
src/core/Microsoft.PowerToys.Settings.UI/Views/ImageResizerPage.xaml
Outdated
Show resolved
Hide resolved
src/core/Microsoft.PowerToys.Settings.UI/Views/ImageResizerPage.xaml
Outdated
Show resolved
Hide resolved
src/core/Microsoft.PowerToys.Settings.UI/Views/ImageResizerPage.xaml
Outdated
Show resolved
Hide resolved
I'll try this locally on my system to make sure the changes work since I already have the older JSON settings saved in the AppData folder. |
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.
I wasn't able to change the following settings (it did not make any change on the JSON file, so if you switch to another powertoys settings and come back it would be reset)
- Sizes (editing names or values or even adding sizes did not make any change) [Even after clicking Save Sizes)
- Fallback encoder
Also for sizes what is the expected behaviour when a new size is added/an existing size is modified while the ImageResizer app is open? Will the Image Resizer UI refresh to show the updated sizes? It was like that on the earlier version.
src/core/Microsoft.PowerToys.Settings.UI/Views/ImageResizerPage.xaml
Outdated
Show resolved
Hide resolved
src/core/Microsoft.PowerToys.Settings.UI.Lib/ImageResizerProperties.cs
Outdated
Show resolved
Hide resolved
Can you verify this on your machine thanks: fa7741b |
With regards to syncing: I cannot load a .NetFramwork based application into a .Netcore application. Syncing settings would require tracking the JSON file which is something we are planning to do in the future. Twoway IPC makes no sense to use it since we are going to deprecate it. @crutkas any guidance on this? |
The settings still
Image resize still picks up the settings from the son file. |
I'll also add that earlier since the Settings was from ImageResizer the syncing was definitely required, however now since they are from two completely detached UIs I feel it may not be needed since it won't be very common that a user changes the settings while ImageResizer is open. |
@laviusmotileng-ms I'm seeing some weird interaction between the add size and the Fallback encoder options. If I add a new size, I can see the change in the JSON file. But after that when I change the fallback encoder the newly added size disappears from the JSON file (but still shows in UI). Even the reverse applies where I change Fallback encoder, then add a new size then the fallback encoder reverts back in the JSON file. The only way for it to persist seems to be add a new size, switch to another powertoy settings and come back and then change fallback encoder |
Verified that it is working with the old settings.json file. |
Thanks for the catch. I will look into it. |
I saved the settings in a prettified format for debugging purposes. it shouldn't negatively affect the loading of the json file by image resizer IMO. I will revert the change. |
Thanks a lot for checking Arjun, I resolved that here: 26fd731 |
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.
LGTM! Verified the latest changes with old and new settings.json files.
Out of curiosity, what is the effect of adding the static resource binding? I'm not too familiar with it. |
I was using two different type of binding in the XML view file. As a result, two instances of the viewmodel class was created resulting in one instance updating the Encoder and the other sizes. As a result the settings were overriding each other on save. With regards to the actual difference here is a list:
|
Summary of the Pull Request
References
PR Checklist