parts

Real Qt widgets the thirty Home-screen variants are built from.

Everything here is a genuine widget — the ones that already exist in spaCR (HTile, Card, Section, Divider, UsageBar, ElidingLabel, the real Sidebar) are imported and used as-is; the ones a variant proposes but the app does not have yet (a recent-runs strip, a resume banner, a guided quick-start, a project status bar, a what’s-new panel, a big illustrated tile) are built here as minimal but real widgets, so a layout that wins the review is known-buildable.

No mockups. No painted screenshots.

Attributes

Classes

BigTile

A large illustrated launcher tile: icon above name above blurb.

DenseRow

A compact one-line app row: small icon, name, blurb, optional badge.

FixedButton

A QPushButton whose size the app stylesheet cannot take away.

Page

A 1440x900 home-screen canvas with optional window chrome.

Functions

big_tile_grid(→ PySide6.QtWidgets.QWidget)

A grid of BigTile.

cat_header(→ PySide6.QtWidgets.QWidget)

A category heading: tracked small caps, optional hairline rule.

cat_rail(→ PySide6.QtWidgets.QWidget)

A left rail of CATEGORIES (not apps) beside a content pane.

chip(→ PySide6.QtWidgets.QPushButton)

A pill-shaped filter chip.

dense_list(→ PySide6.QtWidgets.QWidget)

A vertical stack of DenseRow.

elide_to_lines(→ str)

Shorten text so it lays out in at most lines at width px.

extra_qss(→ str)

Stylesheet for the object names this module introduces.

hero(→ PySide6.QtWidgets.QWidget)

The current home hero: logo + wordmark + one-line pitch.

hint_bar(→ PySide6.QtWidgets.QLabel)

The sticky bottom hint bar the current home screen ships with.

htile(→ PySide6.QtWidgets.QWidget)

One of the app's real HTile cards, at a fixed width.

htile_grid(→ PySide6.QtWidgets.QWidget)

A wrapping grid of real HTile cards.

htile_height(→ int)

Minimum height an HTile needs so its icon is not cropped.

kbd(→ PySide6.QtWidgets.QLabel)

A keycap chip, e.g. Ctrl+1.

line_count(→ int)

How many lines text occupies when wrapped at width px.

menu_strip(→ PySide6.QtWidgets.QWidget)

The app's menu bar, as a real (non-interactive) strip.

panel(ctx, *[, accent, plain, margins, spacing, ...])

A rounded surface panel plus its layout.

pinned_row(, *, tile_w, tile_h)

ADDED: a pinned-favourites row the user curates themselves.

plain_header(→ PySide6.QtWidgets.QWidget)

A sentence-case heading (used where small caps read as shouting).

project_status_strip(→ PySide6.QtWidgets.QWidget)

ADDED: which dataset is open, how big it is, what state it is in.

queue_panel(→ PySide6.QtWidgets.QWidget)

ADDED: what is queued to run next, straight on the home screen.

quick_start() → PySide6.QtWidgets.QWidget)

ADDED: a guided first-run path — three numbered steps with buttons.

real_sidebar(→ PySide6.QtWidgets.QWidget)

The app's actual Sidebar widget, unmodified.

recent_runs_list(→ PySide6.QtWidgets.QWidget)

ADDED: the same history as a narrow vertical list.

recent_runs_strip(→ PySide6.QtWidgets.QWidget)

ADDED: the last few runs as resumable cards.

resume_banner(→ PySide6.QtWidgets.QWidget)

ADDED: "pick up where you left off" — the single biggest button.

scroll_area(→ PySide6.QtWidgets.QScrollArea)

Wrap a widget in a frameless scroll area (vertical by default).

search_box(→ PySide6.QtWidgets.QLineEdit)

A real search field (the search-first variants' entry point).

start_run_panel(→ PySide6.QtWidgets.QWidget)

ADDED: one prominent "start a run" path — folder, pipeline, Run.

stat_row(→ PySide6.QtWidgets.QWidget)

ADDED: a row of big-number tiles (runs, plates, objects, models).

status_bar(→ PySide6.QtWidgets.QWidget)

The app's status bar: transient message left, app + version right.

system_panel(→ PySide6.QtWidgets.QWidget)

ADDED: disk + GPU state, built on the real UsageBar widget.

text_label(→ PySide6.QtWidgets.QLabel)

A plain styled label (no wrapping, sized to its own text).

top_bar() → PySide6.QtWidgets.QWidget)

A slim brand bar: logo mark + title (+ subtitle) + right actions.

transparent([spacing, margins, horizontal])

A bare container widget plus its layout (background transparent).

whats_new_panel(→ PySide6.QtWidgets.QWidget)

ADDED: what changed in this version, so an upgrade is discoverable.

wrapped(→ PySide6.QtWidgets.QLabel)

A word-wrapped label with a guaranteed line budget.

Module Contents

class parts.BigTile(ctx: common.Ctx, key: str, *, width: int, height: int, icon_px: int = 56, blurb_lines: int = 0, accent: bool = False, badge: str = '')[source]

Bases: FixedButton

A large illustrated launcher tile: icon above name above blurb.

Does not exist in spaCR today — this is the widget the “large illustrated tiles” variants propose, built for real so the layout can be judged on how it actually renders.

class parts.DenseRow(ctx: common.Ctx, key: str, *, width: int, name_width: int = 136, icon_px: int = 20, show_blurb: bool = True, badge: str = '', shortcut: str = '')[source]

Bases: PySide6.QtWidgets.QPushButton

A compact one-line app row: small icon, name, blurb, optional badge.

The “dense list” answer to the tile grid — many more apps above the fold, at the cost of the tile’s visual weight.

class parts.FixedButton(width: int, height: int, parent=None)[source]

Bases: PySide6.QtWidgets.QPushButton

A QPushButton whose size the app stylesheet cannot take away.

setFixedSize alone is not enough here: the app QSS carries QPushButton { min-height: 22px }, and QStyleSheetStyle re-applies that rule’s geometry to the widget on polish, wiping the minimum a setFixedSize had set. The layout then reads a 40 px minimum and squashes a 116 px tile to 48 px — which is exactly the kind of silent clipping these renders exist to catch. Reporting the size through sizeHint/minimumSizeHint survives the restyle.

minimumSizeHint() PySide6.QtCore.QSize[source]

Same as sizeHint() — the tile does not shrink.

sizeHint() PySide6.QtCore.QSize[source]

The size asked for at construction, always.

class parts.Page(ctx: common.Ctx, *, chrome: bool = True, margins: Tuple[int, int, int, int] = (28, 22, 28, 18), spacing: int = 16)[source]

Bases: PySide6.QtWidgets.QWidget

A 1440x900 home-screen canvas with optional window chrome.

Parameters:
  • ctx – the theme context.

  • chrome – draw the app’s menu strip + status bar, so the space a variant actually gets on a 1440x900 laptop is what is rendered.

  • margins – content margins of the body area.

add_aside(aside: PySide6.QtWidgets.QWidget) None[source]

Insert a column to the right of the content area.

add_rail(rail: PySide6.QtWidgets.QWidget) None[source]

Insert a navigation rail to the left of the content area.

finish(footer: PySide6.QtWidgets.QWidget | None = None, status: str | None = None) Page[source]

Attach the optional footer + status bar. Returns self.

body[source]
ctx[source]
middle[source]
parts.big_tile_grid(ctx: common.Ctx, keys: Sequence[str], *, cols: int, width: int, height: int, icon_px: int = 56, blurb_lines: int = 0, hspace: int = 10, vspace: int = 10, badges: dict | None = None) PySide6.QtWidgets.QWidget[source]

A grid of BigTile.

parts.cat_header(ctx: common.Ctx, text: str, *, rule: bool = True, note: str = '', size: int = 11) PySide6.QtWidgets.QWidget[source]

A category heading: tracked small caps, optional hairline rule.

parts.cat_rail(ctx: common.Ctx, titles: Sequence[str], *, selected: int = 0, width: int = 232, header: str = '', counts: Sequence[int] | None = None) PySide6.QtWidgets.QWidget[source]

A left rail of CATEGORIES (not apps) beside a content pane.

parts.chip(ctx: common.Ctx, text: str, on: bool = False) PySide6.QtWidgets.QPushButton[source]

A pill-shaped filter chip.

parts.dense_list(ctx: common.Ctx, keys: Sequence[str], *, width: int, name_width: int = 136, show_blurb: bool = True, badges: dict | None = None, shortcuts: dict | None = None, spacing: int = 1) PySide6.QtWidgets.QWidget[source]

A vertical stack of DenseRow.

parts.elide_to_lines(text: str, font: PySide6.QtGui.QFont, width: int, lines: int) str[source]

Shorten text so it lays out in at most lines at width px.

Uses QTextLayout — the same line breaker QLabel uses — so the answer is exact rather than a character-count guess. Text clipping is the exact defect the home-screen rework was raised to fix, so every wrapped blurb in these variants goes through here.

parts.extra_qss(ctx: common.Ctx) str[source]

Stylesheet for the object names this module introduces.

parts.hero(ctx: common.Ctx, *, compact: bool = False) PySide6.QtWidgets.QWidget[source]

The current home hero: logo + wordmark + one-line pitch.

parts.hint_bar(ctx: common.Ctx, text: str = 'Hover a tile to see what it does.') PySide6.QtWidgets.QLabel[source]

The sticky bottom hint bar the current home screen ships with.

parts.htile(ctx: common.Ctx, key: str, *, width: int, height: int = 0, icon_px: int = 44, name_px: int = 0) PySide6.QtWidgets.QWidget[source]

One of the app’s real HTile cards, at a fixed width.

Parameters:

name_px – override the tile name’s font size. The shipped tile draws it at the 17 px “subtitle” size, which is what forces a 255 px minimum width and therefore at most five columns on a 1440 px screen; the compact variants restyle that one label.

parts.htile_grid(ctx: common.Ctx, keys: Sequence[str], *, cols: int, width: int, hspace: int = 8, vspace: int = 8, icon_px: int = 44, height: int = 0, name_px: int = 0) PySide6.QtWidgets.QWidget[source]

A wrapping grid of real HTile cards.

parts.htile_height(icon_px: int) int[source]

Minimum height an HTile needs so its icon is not cropped.

parts.kbd(ctx: common.Ctx, text: str) PySide6.QtWidgets.QLabel[source]

A keycap chip, e.g. Ctrl+1.

parts.line_count(text: str, font: PySide6.QtGui.QFont, width: int) int[source]

How many lines text occupies when wrapped at width px.

parts.menu_strip(ctx: common.Ctx) PySide6.QtWidgets.QWidget[source]

The app’s menu bar, as a real (non-interactive) strip.

parts.panel(ctx: common.Ctx, *, accent: bool = False, plain: bool = False, margins=(14, 12, 14, 12), spacing: int = 8, horizontal=False)[source]

A rounded surface panel plus its layout.

parts.pinned_row(ctx: common.Ctx, keys: Sequence[str] = (), *, tile_w: int = 150, tile_h: int = 108) PySide6.QtWidgets.QWidget[source]

ADDED: a pinned-favourites row the user curates themselves.

parts.plain_header(ctx: common.Ctx, text: str, note: str = '') PySide6.QtWidgets.QWidget[source]

A sentence-case heading (used where small caps read as shouting).

parts.project_status_strip(ctx: common.Ctx) PySide6.QtWidgets.QWidget[source]

ADDED: which dataset is open, how big it is, what state it is in.

parts.queue_panel(ctx: common.Ctx, *, width: int = 320) PySide6.QtWidgets.QWidget[source]

ADDED: what is queued to run next, straight on the home screen.

parts.quick_start(ctx: common.Ctx, *, width: int = 0, steps: Sequence[Tuple[str, str, str]] = ()) PySide6.QtWidgets.QWidget[source]

ADDED: a guided first-run path — three numbered steps with buttons.

parts.real_sidebar(ctx: common.Ctx) PySide6.QtWidgets.QWidget[source]

The app’s actual Sidebar widget, unmodified.

Used by the baseline variant so the render shows exactly what a 1440x900 laptop gets today — including the fact that one row per registered app plus five section headings does not fit in 900 px, so the bottom of the list is simply not reachable.

parts.recent_runs_list(ctx: common.Ctx, *, count: int = 4, width: int = 320) PySide6.QtWidgets.QWidget[source]

ADDED: the same history as a narrow vertical list.

parts.recent_runs_strip(ctx: common.Ctx, *, count: int = 3, card_width: int = 300, height: int = 92) PySide6.QtWidgets.QWidget[source]

ADDED: the last few runs as resumable cards.

parts.resume_banner(ctx: common.Ctx, *, width: int = 0) PySide6.QtWidgets.QWidget[source]

ADDED: “pick up where you left off” — the single biggest button.

Names the last run and offers to resume it, open its output, or start the next stage.

parts.scroll_area(inner: PySide6.QtWidgets.QWidget, *, horizontal: bool = False) PySide6.QtWidgets.QScrollArea[source]

Wrap a widget in a frameless scroll area (vertical by default).

parts.search_box(ctx: common.Ctx, placeholder: str, *, big: bool = False, width: int = 0) PySide6.QtWidgets.QLineEdit[source]

A real search field (the search-first variants’ entry point).

parts.start_run_panel(ctx: common.Ctx, *, width: int = 0, height: int = 210) PySide6.QtWidgets.QWidget[source]

ADDED: one prominent “start a run” path — folder, pipeline, Run.

parts.stat_row(ctx: common.Ctx, stats: Sequence[Tuple[str, str]], *, height: int = 74) PySide6.QtWidgets.QWidget[source]

ADDED: a row of big-number tiles (runs, plates, objects, models).

parts.status_bar(ctx: common.Ctx, message: str = 'Ready') PySide6.QtWidgets.QWidget[source]

The app’s status bar: transient message left, app + version right.

parts.system_panel(ctx: common.Ctx, *, width: int = 300, title: str = 'System') PySide6.QtWidgets.QWidget[source]

ADDED: disk + GPU state, built on the real UsageBar widget.

parts.text_label(ctx: common.Ctx, text: str, *, size: int = 13, weight: int = 400, color: str | None = None, tracking: str = '0px', upper: bool = False) PySide6.QtWidgets.QLabel[source]

A plain styled label (no wrapping, sized to its own text).

parts.top_bar(ctx: common.Ctx, *, title: str = 'spaCR', subtitle: str = '', actions: Sequence[Tuple[str, bool]] = ()) PySide6.QtWidgets.QWidget[source]

A slim brand bar: logo mark + title (+ subtitle) + right actions.

Parameters:

actions(label, primary) pairs rendered right-aligned.

parts.transparent(spacing: int = 0, margins=(0, 0, 0, 0), horizontal=False)[source]

A bare container widget plus its layout (background transparent).

parts.whats_new_panel(ctx: common.Ctx, *, width: int = 320, items: int = 4) PySide6.QtWidgets.QWidget[source]

ADDED: what changed in this version, so an upgrade is discoverable.

parts.wrapped(ctx: common.Ctx, text: str, width: int, lines: int, *, color: str | None = None, size: int = 12, weight: int = 300, reserve: bool = False) PySide6.QtWidgets.QLabel[source]

A word-wrapped label with a guaranteed line budget.

lines is a ceiling: longer text is elided to fit it, and the label is then sized to the lines it actually uses, so a one-line string in a three-line budget does not leave a hole. Pass reserve=True where a fixed height matters (grid cells that must line up).

parts.HTILE_MIN_WIDTH[source]