Skip to content

Inconsistency in highlighting #11

Description

@DaveFlater

hilit_color is a named color.
text_bg_hilight_color is a Pixel interpreted as a 3-byte value, 0xRRGGBB.
insensitive_twist is a control flag followed by a 1- or 3-byte value.
colorSwitch is a function pointer of type void (*SwitchColorFunc) (Widget w, int n, int x, int y, Pixel *p).

hilit_color and text_bg_hilight_color are applied to colors via bitwise XOR. insensitive_twist supports bitwise AND, OR, XOR, and value assignment to colors, as well as value assignment to alpha.

The application of hilit_color is different in lists and menus and is different when encoding is 0 or nonzero. Sometimes it applies to both fg and bg and sometimes it applies only to bg.

When encoding != 0 && text_bg_hilight == 0, selected text is not highlighted in any way. When encoding == 0, selected text is shown with reversed fg/bg colors regardless of text_bg_hilight.

These should all work the same way, be encoded the same way, and have names that indicate what they apply to.

Metadata

Metadata

Assignees

Labels

uglinessTechnically not broken but clearly wrong and embarrassing

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions