Skip to content

Use better colour for window title during visual_window_select #8579

@ed9w2in6

Description

@ed9w2in6

Is your feature request related to a problem? Please describe.

Currently the window titles is rendered with highlight bg / default bg colours, and for some reason the foreground colour is always black. This is indicated with the red dotted square rectangles in the provided photo.

This is particularly problematic for dark theme. Light theme are less impacted.

Describe the solution you'd like

I believe there are better choices:

  1. maybe using the XX_tab_fg/bg colours in a config to render it instead. (circled green)
  2. use reverse video

I don't really have a preference as long as it is not done how its done right now.

Documentation should also be updated to inform the users that those colours will affect this function too.

Describe alternatives you've considered

  1. Use a light theme
  2. set a contrastive highlight fg / bg defensively
  3. Ignore it.

Additional context
FYR:
Image

(The character rendering problem in the picture is unrelated to this issue.)

Maybe these lines?

kitty/kitty/shaders.c

Lines 781 to 785 in 45f4b8e

snprintf(titlebuf, arraysz(titlebuf), " %s", PyUnicode_AsUTF8(title));
#define RGBCOL(which, fallback) ( 0xff000000 | colorprofile_to_color_with_fallback(screen->color_profile, screen->color_profile->overridden.which, screen->color_profile->configured.which, screen->color_profile->overridden.fallback, screen->color_profile->configured.fallback))
if (!draw_window_title(os_window, titlebuf, RGBCOL(highlight_fg, default_fg), RGBCOL(highlight_bg, default_bg), bar->buf, bar_width, bar_height)) return 0;
#undef RGBCOL
Py_CLEAR(bar->last_drawn_title_object_id);

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions