Skip to content

Dialog hotfocus color misused in listbox #3160

@mc-butler

Description

@mc-butler

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3160
Reporter egmont (@egmontkob)

The highlighted item in listboxes use DLG_COLOR_HOT_FOCUS if the widget is focused, and DLG_COLOR_FOCUS if the widget is not focused.

This is clearly a misuse of the semantics. "Hot" is supposed to stand for hotkey (aka. shortcut key) color, a single character within a string. This feature is unused in listboxes. Using the hotkey color for the whole line makes it underlined in the "sand256" skin which was not intended there. In #2165 I'm working on a config option to use underline for hotkeys with any skin, this bug is blocking that.

I'm not sure if making a distinction whether the widget is focused or not is important, I don't think so. How can a listbox widget be unfocused at all? If it can be, isn't it obvious by other means (e.g. other window overlapping it?)

I think the right approach is to always use DLG_COLOR_FOCUS. (In this case there's still a confusion that what is called "focused" in the skin definiton is "selected" in the source, and "focused" in the source means something totally different.)

The patch also fixes the "sand256" skin, it used to have an explicit underline for popup boxes (e.g. F2 user menu) to make it consistent with the broken listbox (e.g. Alt+H history), it's now removed, from now on underline is used solely for hotkeys in this skin.

Note

Original attachments:

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: skinTheming support and skin filesprio: lowMinor problem or easily worked aroundver: 4.8.11Reproducible in version 4.8.11

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions