Skip to main content

Module layout

Module layout 

Source
Expand description

Responsive layout: pure functions mapping window size + stored pane sizes to the sizes actually rendered. Stored sizes are never modified.

Structs§

CommitColumns
Commit-log column sizes for a given pane width.
LayoutDims
Pane sizes to render.

Enums§

Breakpoint
Coarse window-width class.

Constants§

AUTHOR_COLUMN_PX
Fixed width of the author sub-column in the commit log.
COMMIT_MAX_FRAC
Max commit-log share of width remaining after the sidebar.
COMMIT_MIN_WIDTH
Narrowest commit log we ever render.
COMPACT_WIDTH
Below this width toolbars switch to icon-only buttons.
DIFF_LIST_MAX_FRAC
Max share of the diff pane taken by its file list.
DIFF_MIN_WIDTH
Width reserved for the diff viewer, however small the window.
DIVIDER_W
Width of a vertical divider.
MINIMAL_WIDTH
Below this width secondary toolbar widgets (editor picker, version) go away.
NARROW_WIDTH
Below this window width the sidebar is hidden (or floated as an overlay).
SHORT_HEIGHT
Windows shorter than this use STAGING_MAX_FRAC_SHORT.
SHOW_AUTHOR_FROM
Commit-log width from which the author column is shown.
SHOW_TIME_FROM
Commit-log width from which the date column is shown.
SIDEBAR_MAX_FRAC
Max sidebar share of window width.
STAGING_MAX_FRAC
Max staging-area share of window height.
STAGING_MAX_FRAC_SHORT
Max staging share on short windows, so the commit log keeps room.
STAGING_MIN
Smallest useful staging height.
TIME_COLUMN_PX
Fixed width of the date sub-column in the commit log.
TINY_WIDTH
Below this width even the theme picker is dropped.

Functions§

clamp_dialog
Clamp a dialog dimension so it fits the window with a margin.