jbrowser.ui.onboarding
Generated from the source code of JBrowser 1.5.3.
The first-run welcome: a fade-in logo intro, three story slides, setup pages and a guided tour of the real interface.
Everything is painted on one full-window layer that sits on the Acrylic backdrop (the browser UI is hidden until the tour), with a single animation clock driving every effect:
- intro three brand-coloured orbs swirl in and merge; the logo springs out of the bloom and floats, then the wordmark letters hop in with a colour wave
- story three headlines rise word by word with a shimmering brand gradient
- setup look, search, protection, spaces and finishing touches (changes apply live)
- tour the browser assembles itself and a spotlight glides between its key parts
The click sound plays on every step forward (not on the first slide, where the intro sound is still ringing out).
Constants#
| Name | Value |
|---|---|
ONBOARDING_VERSION |
2 |
BRAND |
('#5b8cff', '#8a5cff', '#ff5c9d') |
STEPS |
['story0', 'story1', 'story2', 'story3', 'look', 'search', 'shield', 'spaces', 'touches… |
LAST_STORY |
'story3' |
STORY |
{'story0': ('Welcome to the internet - again.', {'again.'}, 'JBrowser rethinks the brow… |
HEADERS |
{'look': ('Make it yours.', {'yours.'}, 'Pick how JBrowser looks. Everything here can b… |
EMOJI_CHOICES |
['🏠', '💼', '✨', '🎓', '🎮', '🎨', '💰', '🛒', '✈️', '📚', '🧪', '🎵', '❤️', '🌱', '⚽', '🛠️'] |
Words#
class Wordssource
Words(text: str, accent: set[str] | None=None)
A centred, wrapped phrase whose words rise into place one after another.
Words.layout#
layout(font: QFont, width: float) -> tuple[list[tuple[int, float, float, float]], float, float]source
Qt overrides: paint
ChoiceTile#
class ChoiceTile(QAbstractButton)source
ChoiceTile(title: str, desc: str='', preview: Callable[[QPainter, QRectF], None] | None=None, badge: str='', height: int=150, parent: QWidget | None=None)
A selectable card with a title, a short description and an optional painted preview.
Qt overrides: enterEvent, leaveEvent, sizeHint, paintEvent
SetupPage#
class SetupPage(QWidget)source
SetupPage(key: str, parent: QWidget)
A page of setup controls shown inside a frosted card.
SetupPage.section#
section(text: str) -> QLabelsource
SetupPage.row_of#
row_of(widgets: list[QWidget], stretch: bool=True) -> QHBoxLayoutsource
SwitchRow#
class SwitchRow(QWidget)source
SwitchRow(title: str, desc: str, checked: bool, on_change: Callable[[bool], None], parent: QWidget | None=None, extra: QWidget | None=None)
TourBubble#
class TourBubble(QWidget)source
TourBubble(parent: 'Onboarding')
The glass card that explains the highlighted part of the interface.
Onboarding#
class Onboarding(QWidget)source
Onboarding(window: 'MainWindow', replay: bool=False)
Signals
| Signal | Arguments |
|---|---|
finished |
() |
Attributes
| Name | Value |
|---|---|
TOUR |
[('section', 'Spaces', 'Each space is its own world with separate logins, cookies and c… |
Onboarding.start#
start() -> Nonesource
Onboarding.now#
now() -> floatsource
Onboarding.key_of#
key_of(step: int) -> strsource
Onboarding.go_to#
go_to(step: int, forward: bool=True, sound: bool=True) -> Nonesource
Onboarding.go_next#
go_next() -> Nonesource
Onboarding.go_back#
go_back() -> Nonesource
Onboarding.end_intro#
end_intro() -> Nonesource
Onboarding.skip#
skip() -> Nonesource
Onboarding.begin_assemble#
begin_assemble(tour: bool) -> Nonesource
Onboarding.start_tour#
start_tour() -> Nonesource
Onboarding.tour_go#
tour_go(index: int, sound: bool=True) -> Nonesource
Onboarding.tour_next#
tour_next() -> Nonesource
Onboarding.tour_back#
tour_back() -> Nonesource
Onboarding.finish#
finish() -> Nonesource
Qt overrides: eventFilter, keyPressEvent, mousePressEvent, paintEvent
Functions#
clamp01#
clamp01(x: float) -> floatsource
seg#
seg(t: float, a: float, b: float) -> floatsource
out_cubic#
out_cubic(x: float) -> floatsource
out_quint#
out_quint(x: float) -> floatsource
in_out_cubic#
in_out_cubic(x: float) -> floatsource
out_back#
out_back(x: float, s: float=1.7) -> floatsource
lerp#
lerp(a: float, b: float, t: float) -> floatsource
lerp_rect#
lerp_rect(a: QRectF, b: QRectF, t: float) -> QRectFsource
with_alpha#
with_alpha(c: QColor | str, a: float) -> QColorsource
display_font#
display_font(px: float, weight: QFont.Weight=QFont.Weight.Medium) -> QFontsource
brand_gradient#
brand_gradient(x0: float, x1: float, shift: float=0.0) -> QLinearGradientsource
paint_paragraph#
paint_paragraph(p: QPainter, rect: QRectF, text: str, font: QFont, color: QColor, alpha: float, rise: float) -> Nonesource
paint_glass#
paint_glass(p: QPainter, rect: QRectF, radius: float, alpha: float=1.0, strong: bool=False) -> Nonesource
A frosted panel: translucent fill, soft shadow, hairline border and a top highlight.
preview_theme#
preview_theme(mode: str) -> Callable[[QPainter, QRectF], None]source
preview_material#
preview_material(kind: str) -> Callable[[QPainter, QRectF], None]source