-
-
Notifications
You must be signed in to change notification settings - Fork 170
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: add option to change text color #689
feat: add option to change text color #689
Conversation
Thanks for your contribution! Instead of giving a color picker, I would rather provide a text contrast slider or toggle button and map it to carefully hand-picked colors. This is to ensure that the user cannot, for example, pick a color that makes the app unusable. But also, they shouldn't be able to pick red or the purple color used in the background (which would make the text invisible). On top of that, highlighted keywords in the text use different colors than the main text. They may need adjustments too, and having predefined colors depending on the desired contrast level would allow us to provide a cohesive color palette. Writing this, I think that a "Lower contrast" toggle button would be a good option to try. Having a single low-contrast option that changes only the text color for now (later it could also tweak other colors). Note that it needs to affect the lesson text, but also the TextEdit palette (code editor in the practice UI). |
Yes, you right. I also thought on something like diffrent color themes that could be chosse or something, but probably this is then too much to maintain. A "Lower contrast" toggle button option sounds like a good approach, at least for the first step. Thansk for helping. |
Yes, that would be a neat feature, but it's extra work and maintenance for something low-priority right now.
Would you be comfortable writing the code and implementing the feature with placeholder colors? We could then jump in and tweak the color palette on top of your pull request. Regarding the nodes, this will first need to affect Label and RichTextLabel. Then there are various TextEdit nodes. Those are trickier. To understand why to see So in this is fine by you, I would recommend focusing on just the label and rich text label nodes to start with. And just the normal text color. Once this is done, we can consider the text edit nodes and keyword highlighting in lessons. |
Yes, i could write the code with placeholders for the color(s). But jsut to understand everything correctly, which approach we want now to start with:
At the moment i already handle After that i could check |
Yes! I think it's best to keep things as simple as possible by default and only add more options as people really need them. |
For this we will need to delete the existing text edit nodes and replace them or just rebuild the lesson UI or the practice UI and restore the student´s work state, whichever works best. I unfortunately don't think the API gives us many more options. |
With commit ed582ba Added a CheckButton to the SettingsPopup to enable/disable Lower contrast color for |
Hi Nathan. Are these changes are okay for now? Will you change the "Default color"? |
Sure, thanks for the bump, I'm adding this to my to do list. The changes look good. |
Please check if the PR fulfills these requirements:
Related issue (if applicable): #623
What kind of change does this PR introduce?
Adds new Setting Text Color to the SettingsPopup to change the color of all (
Label
andRichTextLabel
) text in the app.Color setting is also stored to the
Profile
.New feature or change
Other information
Maybe its not the best idea to change
Label
andRichTextLabel
or probably there are Control Nodes who should change color.