ListRow
listRow · Containers · container
A row of a list: the sidebar's branches, the commit list, the changed files.
Import
cpp
#include "gbui/widgets/listRow.hpp"Example
cpp
Ui::Scope listRow(Ui& ui, const ListRowOptions& options = {});Opens a row. Returns a Scope, so its contents are written inside the braces. selected washes the row in the accent at 18%, hovered uses surfaceHover, and both are passed in — components hold no state.
API
ListRowOptions
| Option | Type | Default | What it does |
|---|---|---|---|
selected | bool | false | Passed in, never held. The row draws the state and the application owns it, which is the contract every component here has. |
hovered | bool | false | As above. Separate from what the pointer is over, because a list often wants the keyboard's row lit instead. |
height | float | 28.0f | |
padding | Edges | Edges::symmetric(0.0f, 12.0f) | |
gap | float | 6.0f | |
id | std::string_view |