fix: drop stranded topbar chair chip; blend chrome into panel (0.9.30)
Seat role already lives in the Seat Deck. Remove the lonely right-edge chip and paint the session strip on panel ground so it no longer reads as a raised bar with a hairline seam. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#define CST_VERSION_MAJOR 0
|
||||
#define CST_VERSION_MINOR 9
|
||||
#define CST_VERSION_PATCH 29
|
||||
#define CST_VERSION_PATCH 30
|
||||
|
||||
#define CST_VERSION_STR_(x) #x
|
||||
#define CST_VERSION_STR(x) CST_VERSION_STR_(x)
|
||||
|
||||
@@ -613,9 +613,10 @@ static void theme_init(void) {
|
||||
init_pair(CP_BRIGHT, bright, panel);
|
||||
init_pair(CP_LOGO_DIM, logo_dim, panel);
|
||||
init_pair(CP_SEL, panel, accent);
|
||||
init_pair(CP_TOPBAR, bright, side);
|
||||
init_pair(CP_TOPBAR_MUTED, muted, side);
|
||||
init_pair(CP_TOPBAR_ACCENT, accent, side);
|
||||
/* Same panel ground as the transcript — no raised strip / hairline seam. */
|
||||
init_pair(CP_TOPBAR, bright, panel);
|
||||
init_pair(CP_TOPBAR_MUTED, muted, panel);
|
||||
init_pair(CP_TOPBAR_ACCENT, accent, panel);
|
||||
}
|
||||
|
||||
/* Blank the window into the virtual screen before deleting it: refreshing
|
||||
@@ -3184,23 +3185,23 @@ static void draw_topbar(tui_t *t) {
|
||||
if (hexish)
|
||||
title = "New session";
|
||||
}
|
||||
snprintf(left, sizeof(left), " %s", title);
|
||||
int x = draw_ansi_at(w, 0, 0, bw, left, CP_TOPBAR, 1, 0);
|
||||
if (cfg && x + 8 < bw) {
|
||||
char mid[160];
|
||||
snprintf(mid, sizeof(mid), " %.48s%s%.24s", cfg->model,
|
||||
/* Title + model only. Role lives in the Seat Deck — a lone chair/seat
|
||||
* chip on the far right just duplicates it and looks stranded. */
|
||||
int model_room = 0;
|
||||
char mid[160] = "";
|
||||
if (cfg) {
|
||||
snprintf(mid, sizeof(mid), "%.40s%s%.20s", cfg->model,
|
||||
cfg->provider[0] ? " · " : "", cfg->provider);
|
||||
x += draw_ansi_at(w, 0, x, bw - x, mid, CP_TOPBAR_MUTED, 0, 0);
|
||||
}
|
||||
if (cst_parliament_is_active() && bw > 24) {
|
||||
char chip[64];
|
||||
if (cst_parliament_is_chair())
|
||||
snprintf(chip, sizeof(chip), " chair ");
|
||||
else
|
||||
snprintf(chip, sizeof(chip), " seat ");
|
||||
int cw = (int)strlen(chip);
|
||||
draw_ansi_at(w, 0, bw - cw - 1, cw, chip, CP_TOPBAR_ACCENT, 1, 0);
|
||||
model_room = utf8_cols(mid, strlen(mid)) + 2;
|
||||
}
|
||||
int title_max = bw - 2 - model_room;
|
||||
if (title_max < 8)
|
||||
title_max = 8;
|
||||
size_t tfit = utf8_fit_cols(title, strlen(title), title_max);
|
||||
snprintf(left, sizeof(left), " %.*s", (int)tfit, title);
|
||||
int x = draw_ansi_at(w, 0, 0, bw, left, CP_TOPBAR, 1, 0);
|
||||
if (mid[0] && x + 2 < bw)
|
||||
draw_ansi_at(w, 0, x + 2, bw - (x + 2), mid, CP_TOPBAR_MUTED, 0, 0);
|
||||
wrefresh(w);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user