-
-
Notifications
You must be signed in to change notification settings - Fork 601
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(ui): Add use_selection_fg flag to control selection foreground color #2515
Conversation
@Upsylonbare can you elaborate on what the motivation for this change is? Maybe a screenshot of the old vs. new. to help illustrate the issue you try to solve |
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.
3acf41f
to
6397daf
Compare
@Upsylonbare I also would like to keep fg colors same on selection, For And default impl. in code: Here's patch implementing that based on your commits, |
Wouldn't this break user's theme configurations as it would change the selection_fg type? |
Correct, it will. Advantage is simplicity, logic incapsulated within one field Maybe with my approach |
Breaking is fine as long as we document it properly in the changelog. |
Another option: we already have more than one code path for loading themes, so adding another one could potentially automate the migration. I’m all for making users’ lives easier, but I also understand if we don’t want to increase code complexity in this instance. Lines 304 to 324 in 232ad89
|
Hi, I don't get your point here. To me the apply function you are referring is the one that load the ron theme into a theme struct. My patches only use this theme struct while rendering the line. But I may be wrong. |
@vlad-anger I firstly thought the feature the way you wrote it in your gist but as said it breaks retrocompatibility with 'old' theme. |
Honestly i'm not sure what's better |
Yes you're right. |
@Upsylonbare please resolve conflicts. |
When set to `False` (default `True`), keep the foreground color of the selected object (commit hash, date, etc ...).
Sorry first time I deal with Github PR, I think I've clicked on the wrong button |
Thank you guys! |
When set to
False
(defaultTrue
), keep the foreground color of the selected object (commit hash, date, etc ...).It changes the following:
use_selection_fg
flag to theTheme
struct, allowing users to toggle whether the selection foreground color is applied.use_selection_fg
totrue
by default inTheme::Default
.use_selection_fg
.I followed the checklist:
make check
without errors