-
-
Notifications
You must be signed in to change notification settings - Fork 58
Ticket #4974: Skinnable hint bar, prompt and cmdline; plus other cleanups #4976
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
base: master
Are you sure you want to change the base?
Conversation
…dget Signed-off-by: Egmont Koblinger <egmont@gmail.com>
|
Please review along with pending questions in the referred issues, including:
|
f3494c5 to
1da4a18
Compare
…mmand line skinnable New keywords "hintbar", "prompt" and "commandline" under the "[core]" section of skin files control the colors of these parts of the screen. Update the skins to still use terminal's default colors here, as before. Remove the hline widget's unused transparent parameter, so that our widgets don't have this concept anymore. Fix some typos in comments. Signed-off-by: Egmont Koblinger <egmont@gmail.com>
…areas of buttonbar This only affects windows narrower than 70 columns. With this change, there are no more characters on the skin that aren't skinnable and are necessarily of the terminal's default colors. Signed-off-by: Egmont Koblinger <egmont@gmail.com>
…color and "terminal_default_color" role Remove support for the "base" color value which was presumably never used. Remove support for the "[skin]" section's "terminal_default_color" keyword which did not work and whose intent was unclear. Remove the no longer used and misleadingly named internal variable CORE_DEFAULT_COLOR. Signed-off-by: Egmont Koblinger <egmont@gmail.com>
This is what the previously wrongly named CORE_DEFAULT_COLOR, retired in the previous commit, should have always stood for. Signed-off-by: Egmont Koblinger <egmont@gmail.com>
1da4a18 to
a79a9de
Compare
| /* Color styles for label widgets */ | ||
| label_colors_t label_colors; | ||
| label_colors_t hintbar_colors; | ||
| label_colors_t prompt_colors; |
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.
Hintbar and prompt are parts of file manager. hintbar_colors and prompt_colors should be defined and declared in filemanager.[ch].
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.
We've had pretty much the same discussion in PR #4916 :)
I continued the existing pattern to keep the code consistent.
I agree with you that it would be a cleaner design pattern to declare and initialize these colors at the caller, rather than the widget knowing about them. In order to keep our code consistent, I guess the existing code (e.g. alarm a.k.a. error, listbox, and help colors) should also be ported to this pattern.
Practically, it would mean the introduction of several tiny new methods, e.g. adding an init() to help as per the discussion of that PR. Also, when initializing mc or when applying a skin, we'd need to call many more such small methods.
I have doubts that it would be an overall win. But let me know if you still want me to do this, I will do then. Or maybe meet halfway: if you'd want to do that refactoring around alarm_colors / listbox_colors / help_colors in the exisiting code and then I'll rebase my changes and keep following your pattern?
|
|
||
| prompt_colors[LABEL_COLOR_MAIN] = CORE_PROMPT_COLOR; | ||
| prompt_colors[LABEL_COLOR_DISABLED] = CORE_DISABLED_COLOR; // unused | ||
| } |
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.
hintbar_colors and prompt_colors assignments should be moved to a separate function in the file manager area.
|
Labels in error dialogs have the wrong color. I need to figure out how to denote in a label whether to inherit the colors from the parent widget (the wrongly removed In a way that mostly fits the current design. The "disabled" color is now hardwired to always use Which means that only a single color needs to be configurable. I might eliminate |
I'm not sure what's the best place to have this discussion such that the posts are not mixed up with posts related to specific issues/PRs. Probably we could open a GitHub discussion for that. I would answer here, and if it becomes too annoying, then I would suggest we split it out.
My understanding is that Andrew didn't veto it, so in as far as I'm concerned, I'd say yes.
Irrelevant considering the above.
In as far as I'm concerned, yes, I'm okay with that.
I think maybe this should be discussed in the ticket. I understand and agree that ambiguity is not good. However, I would tend towards "shell-prompt" or something like this if we decide to change it, because I find "separatorless" words annoying and very hard to read. And, for the record, I'm still struggling to get through my mail. |
I will go for "shellprompt" in this PR, to be consistent (separatorless) with all the other color words. I agree with your preference of using a separator, see #3159. I'll probably address that, along with a backwards compatible fallback option as per #4975, for all existing keywords. Then it'll turn into "shell-prompt". If I get to do this in the same dev cycle (which I'm truly hoping and aiming for) then there'll be no need for compat fallback for this one. |
Proposed changes
Checklist
👉 Our coding style can be found here: https://midnight-commander.org/coding-style/ 👈
git commit --amend -smake indent && make check)