Add show_dividers option to draw a line between items - #68
Open
HoneyHazard wants to merge 2 commits into
Open
Conversation
Item rows already have a 2-row gap between them (NodeWidget::spacing()/ DeviceWidget::spacing()), but that space is always blank. On a list with many similarly-styled rows it can be hard to tell at a glance where one item ends and the next begins, especially at a glance or on a low-contrast theme. Adds show_dividers: bool (default false) plus a new divider theme key and divider char_set glyph. When enabled, draws a one-row line spanning the item's width in the gap immediately below it, styled by theme.divider and built from char_set.divider (a single glyph, repeated to fill the width - same pattern as volume_filled/volume_empty). No divider is drawn after the last visible item, so it never touches the footer/tab bar. Since the divider only ever draws into the gap row that already exists between items, turning it on never changes the list's layout or item spacing - only what's drawn in space that was already blank. Off by default, so it's a no-op for any existing config. Both the Playback/Recording/Output/Input Devices node list (NodeWidget-based) and the Configuration tab's device list (DeviceWidget-based) go through the same object_list.rs render loop, so a single render_divider() helper covers both list kinds. Tested: cargo test --release (147/147 passing, including 3 new tests covering the disabled no-op case, the enabled case drawing the glyph across the full width, and clipping at the list's bottom edge without panicking). cargo fmt --check, cargo clippy -- -D warnings, and cargo doc (all matching wiremix's CI) clean. Manually verified in tmux with --show-dividers that the divider line renders between every pair of adjacent items without disturbing layout, and that leaving the option unset reproduces stock behavior exactly.
HoneyHazard
force-pushed
the
item-dividers
branch
from
August 6, 2026 10:28
03cfe72 to
0ea25f9
Compare
HoneyHazard
marked this pull request as ready for review
August 8, 2026 03:49
Dividers previously drew into the first row of the existing 2-row gap between items, immediately below whichever item sat above - one blank row below the divider, none above it. Now, whenever show_dividers is on, one extra row of spacing is reserved per item (2 -> 3) so the divider can sit on the middle row instead: one blank row above it, one below, symmetric with respect to both neighboring items. With show_dividers off (the default), spacing and the whole list's layout are completely untouched - same row count, same scroll/page math, same everything as before this change and as stock wiremix. ObjectList::update()/visible_objects() (and the private visible_count() they both rely on) now take a show_dividers bool so their scroll/ viewport math can agree with the extra row ObjectListWidget::render() reserves per item - previously this was implicit and only render() knew about it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
That being said, I hope these can be helpful and useful additions that users could appreciate.
Item rows already have a gap between them (
NodeWidget::spacing()/DeviceWidget::spacing()), but that space is always blank. On a list with many similarly-styled rows it can be hard to tell at a glance where one item ends and the next begins, especially on a low-contrast theme.Default theme with
--show-dividerson the command line.Adds
show_dividers: bool(defaultfalse) plus a newdividertheme key anddividerchar_set glyph:theme.dividerand built fromchar_set.divider(a single glyph, repeated to fill the width - same pattern asvolume_filled/volume_empty).show_dividerson reserves one extra row of spacing per item (so fewer items fit on screen at once than with it off); withshow_dividersoff, spacing - and the whole list's layout - is completely untouched, matching stock wiremix exactly.NodeWidget-based) and the Configuration tab's device list (DeviceWidget-based) go through the sameobject_list.rsrender loop, so a singlerender_divider()helper covers both list kinds.New config keys (all optional, no-op when unset):
Also available as
--show-dividers/--no-show-dividerson the command line.Tested:
cargo test --release: 148/148 passing, including tests covering the disabled no-op case, the enabled case drawing the glyph centered with a blank row on each side, clipping at the list's bottom edge without panicking, and thatshow_dividersreserves the extra row of spacing only when it's actually on (confirmed by comparing how many items fit in an identicalRectwith it on vs. off)cargo fmt --check/cargo clippy -- -D warnings/cargo doc(matching this repo's CI): all clean--show-dividers: the divider line renders centered between every pair of adjacent items, with a real terminal-row-count difference from leaving it off (5 items fit per screen without dividers vs. 4 with, at the same terminal size) - and that leaving the option unset reproduces stock behavior exactly, byte-for-byte the same layout as before this PRDrafted with AI assistance (Claude); reviewed by me before opening. Left as a draft while I finish going through it - not requesting review yet.