diff options
| author | user <user@clank> | 2026-08-14 14:59:20 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-14 14:59:20 +0200 |
| commit | 6d85e816e3c2ca7ae5dab958f5eef5f5763a959c (patch) | |
| tree | 3572143deb19da7b437b36e91dac1bc3252e29de /src | |
| parent | sl0ppty: the resize gap says it is a handle (diff) | |
| download | slosh-6d85e816e3c2ca7ae5dab958f5eef5f5763a959c.tar.gz slosh-6d85e816e3c2ca7ae5dab958f5eef5f5763a959c.tar.xz slosh-6d85e816e3c2ca7ae5dab958f5eef5f5763a959c.zip | |
sl0ppty: the resize hint names the verb
The dotted line said "this is a handle" and left what pulling it would do to
be worked out from the fact that it sits between two panes. An arrow in the
middle of the line says it outright.
It points along the axis the boundary *moves*, not the one it is drawn on: a
divider between two columns is a vertical line that travels sideways, and the
travelling is the half worth showing. So a column boundary gets a sideways
arrow and a row boundary an up-down one, which is the opposite of the line
each is drawn with and the right way round for the gesture.
Always bold, in both states, because it is the one cell of the hint that is
meant to be read; the line around it carries whether you are hovering or
holding.
Double arrows rather than U+2194 and U+2195. Those carry emoji presentation
and are widely rendered double-width, and screen_text books every chrome glyph
as exactly one cell, so one that drew as two would shift the rest of the row —
the same trap the split-guide arrows had to avoid. U+21D4 and U+21D5 have no
emoji form, and happen to rhyme with the doubled line the active state already
uses.
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -1736,16 +1736,31 @@ static void draw_resize_hint(app_t *a, screen_t *s, node_t *split, size_t idx, } uint16_t attrs = active ? ATTR_BOLD : 0; + + /* An arrow in the middle of the line, naming the verb: the dots say this is + * a handle, the arrow says what pulling it does. It points along the axis the + * boundary *moves*, not the one it lies on — a divider between two columns is + * drawn vertically and travels sideways, and the useful half of that is the + * travelling. Always bold: it is the one cell meant to be read. + * + * Double arrows rather than U+2194/U+2195, which carry emoji presentation and + * are widely drawn double-width; screen_text books a chrome cell as one, so a + * glyph that drew as two would shift the row. They also happen to rhyme with + * the doubled line the active state uses. */ if (split->dir == SPLIT_COLS) { uint16_t x = (uint16_t)(gapr.x + gapr.w / 2); for (uint16_t y = gapr.y; y < gapr.y + gapr.h; y++) screen_text(s, x, y, active ? "\u2551" : "\u250a", FRAME_FOCUS, NO_COLOR, attrs); + screen_text(s, x, (uint16_t)(gapr.y + gapr.h / 2), "\u21d4", FRAME_FOCUS, + NO_COLOR, ATTR_BOLD); } else { uint16_t y = (uint16_t)(gapr.y + gapr.h / 2); for (uint16_t x = gapr.x; x < gapr.x + gapr.w; x++) screen_text(s, x, y, active ? "\u2550" : "\u2508", FRAME_FOCUS, NO_COLOR, attrs); + screen_text(s, (uint16_t)(gapr.x + gapr.w / 2), y, "\u21d5", FRAME_FOCUS, + NO_COLOR, ATTR_BOLD); } } |
