Skip to content

Skinnable hint bar & cmdline #4974

@egmontkob

Description

@egmontkob

Is there an existing request for this?

  • I have searched the existing issues

Is your feature request related to a problem?

It's hardcoded that the hint bar, the prompt, and the command line are "transparent", i.e. use the terminal's default colors.

(Except for marked text within the command line: [core].commandlinemark.)

There's no reason to keep this limitation.

For the command line, the rationale is probably that we want to provide the impression that mc is transparent here, although technically that's not true, we do paint the prompt ourselves, and e.g. colors in the user's prompt are lost. The hint bar being "transparent" can't even be justified by us trying to give this impression of transparency, I don't have an idea what was the design thought here.

It might be handy to separate the prompt and the command line using a different color, I expect a few skin authors wanting to do so. A third color for the hint bar (maybe some skins want to repeat the panels' colors, or so).

[core]
    hintbar = ...
    shellprompt = ...   (or prompt?)
    commandline = ...

Skins can already refer to the terminal's default color using the "default" keyword, as used intensively in the modar*debfg* themes. That is, the current look can be preserved by adding these keywords to our existing skins, with default;default values.

Now, this change would break the look of 3rd party skins until they're updated (since if a keyword is missing then we fall back to [core]._default_); #4975's fallback key might be a remedy.

Nitpicking: shall we call it "prompt" or "shellprompt"? The latter is more specific and is IMO more intuitive (mc's dialogs are also prompts in some sense), although technically not correct if subshell support is disabled and thus there's no shell.


This change would not only add a feature, but allow an internal cleanup.

The internal transparent flag would no longer be needed, it could be removed (replaced by a custom color). (Also remove it from the hline widget where it's unused now.)

The badly named CORE_DEFAULT_COLOR, referring to the terminal's default, would no longer be needed. Similarly, we'd no longer have to have color pair 0 always referring to the terminal's default color. The terminal's default colors, if used at all, would be allocated a random color pair number. The badly named CORE_NORMAL_COLOR could be renamed to its proper name CORE_DEFAULT_COLOR. See also #4950.

Describe the solution you'd like

.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: skinTheming support and skin filesprio: mediumHas the potential to affect progress

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions