Skip to main content

Module nav_item

Module nav_item 

Source
Expand description

A sidebar row the way Finder draws one: an accent-colored symbol and a title, with a quieter badge such as a count at the end, on a rounded highlight that shows the row is selected, pressed or under the pointer.

StructsΒ§

NavItem πŸ”’
The row’s views, under a button that covers the whole row and draws nothing itself: it takes clicks anywhere on the row, tracks the pointer, and carries the title for screen readers.
RowButton πŸ”’
RowLook πŸ”’
What the row’s highlight shows. The row is held weakly, since the row owns the button that owns this.

ConstantsΒ§

CORNER_RADIUS πŸ”’
HOVER_TINT πŸ”’
How strongly the text color shows through the row while under the pointer, and while pressed. Tints of the label color follow dark mode.
ICON_GAP πŸ”’
ICON_SIZE πŸ”’
INSET πŸ”’
PRESSED_TINT πŸ”’
ROW_HEIGHT πŸ”’
The height and corner radius of Finder’s sidebar rows, the space at each end, the symbol’s square and the space after it, in points.

FunctionsΒ§

label πŸ”’