Skip to content

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

Nothing is downloaded until you press it.

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

OptionTypeDefaultWhat it does
selectedboolfalsePassed in, never held. The row draws the state and the application owns it, which is the contract every component here has.
hoveredboolfalseAs above. Separate from what the pointer is over, because a list often wants the keyboard's row lit instead.
heightfloat28.0f
paddingEdgesEdges::symmetric(0.0f, 12.0f)
gapfloat6.0f
idstd::string_view

Released under the LGPL-3.0-or-later licence.