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

Adding serialized save file and storing theme settings. #43

Merged
merged 5 commits into from
Oct 9, 2023

Conversation

toadkarter
Copy link
Contributor

@toadkarter toadkarter commented Oct 8, 2023

Resolves #8

CHANGES

  • A new configuration file is now available for saving certain user specific-settings.
  • If one does not already exist, the configuration file will be created at the following directory:

Linux and MacOS: if defined, $XDG_CONFIG_HOME/logicrs/config.json. If not, $HOME/.config/logicrs/config.json
Windows: %USERPROFILE%\AppData\Local\logicrs\config.json

  • Currently, the settings file is only used for saving the theme, so that this persists between application sessions.
  • If for some reason writing or reading from or to the settings file becomes impossible, an error message will be logged and the application will proceed under the assumption that user settings cannot be accessed.

TESTING CRITERIA

  1. Open the application.
  2. Change the theme by selecting an option from Settings -> Theme.
  3. Close the application.
  4. Restart the application and notice that the chosen theme from Step 2 is now loaded immediately.
  5. Also notice that when accessing Settings -> Theme, the radio button will now be set to the currently selected theme.

Please do let me know if you have any thoughts on the implementation - I am very new to Rust so if you have any suggestions for improvements I would be very happy to implement them!

@toadkarter toadkarter marked this pull request as ready for review October 8, 2023 14:55
@Spydr06
Copy link
Owner

Spydr06 commented Oct 9, 2023

Awesome, excellent job!

@Spydr06 Spydr06 merged commit 5a01926 into Spydr06:main Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Theme not being saved upon close/open
2 participants