Skip to content
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

Fixed delay in synchronization of font size increment and decrement #1609

Merged
merged 3 commits into from
Mar 11, 2024

Conversation

ibrahimcetin
Copy link
Contributor

Description

This PR should fix #1396 but I am not sure.

My understanding is that, editorFontSize in ViewCommands is not updating after increase or decrease. For example, if editorFontSize value is 12, after increasing it will be 13 and it will be rendered but editorFontSize value in ViewCommands won't be updated so editorFontSize remain same (in this case 12 and its increased value always will be 13, so there will be no change to see) but it changed and it is 13, just editorFontSize did not get the updated value. The same goes for terminalFontSize.

To fix it, I tried some ways (using binding etc.) but only working way I found is returning Settings.shared.preferences[keyPath: keyPath] from getters instead of settings.wrappedValue in AppSettings. But I am not sure if it is the correct solution. However, there is no broken part I can see so it can be the solution.

I also improved readability of the code and removed deprecated code.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Font increase and decrease works

screenrecord.mov

@austincondiff austincondiff changed the title Fix #1396 Fixed delay in synchronization of font size increment and decrement Mar 11, 2024
@austincondiff austincondiff added the bug Something isn't working label Mar 11, 2024
@austincondiff austincondiff merged commit 7c773f9 into CodeEditApp:main Mar 11, 2024
2 checks passed
FastestMolasses pushed a commit to Angelk90/CodeEdit that referenced this pull request Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐞 Increase/Decrease Font Size command one step behind
5 participants