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

feat: Change Time from "American (AM/PM)" to "MilitaryTime/European (HH:mm)" option (#58) and DisplayAttribute for Enums in Settings (#61) #63

Merged
merged 2 commits into from
Dec 24, 2024

Conversation

iLollek
Copy link
Contributor

@iLollek iLollek commented Dec 23, 2024

After several days of work, I’m excited to share an update. This has been quite an interesting experience for me.

While working on #58 , I added a new feature to the SettingsManager: an Enum represented as a ComboBox. Inspired by @kawapure's suggestion, I also implemented a DisplayAttribute. This attribute allows developers to display a user-friendly string for Enum values instead of the internal variable names (e.g., "MilitaryTime" becomes "24-hour clock").

Now, when developers want to represent an Enum in the UI via a ComboBox, they can use the [Display("12-Hour Clock (AM/PM)")] attribute (or a similar custom label) above each Enum item. This enhances the UI by presenting more intuitive labels to the user.

@iLollek
Copy link
Contributor Author

iLollek commented Dec 23, 2024

This PR closes #58 and #61

@kawapure
Copy link
Collaborator

Looks good to me.

@kawapure kawapure merged commit 619b55b into not-nullptr:main Dec 24, 2024
@iLollek
Copy link
Contributor Author

iLollek commented Dec 24, 2024

Cool stuff ^^
Please don't forget to close the two Issues.

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.

2 participants