JBrowser Source Docs

jbrowser.ui.titlebar

Generated from the source code of JBrowser 2.0.3.

jbrowser/ui/titlebar.py · 749 lines

Custom title bar: grouped navigation, the address pill, tools and window controls.

Constants#

Name Value
TITLE_H 44
BTN 32

AddressPill#

class AddressPill(QWidget)source
AddressPill(ctx: 'AppContext', parent: QWidget)

Signals

Signal Arguments
clicked ()
spaceClicked (QPoint)
starClicked ()
securityClicked (QPoint)
shieldClicked (QPoint)

AddressPill.set_tab#

set_tab(tab: Tab | None) -> Nonesource

AddressPill.set_shield#

set_shield(blocked: int, protected: bool) -> Nonesource

Qt overrides: event, mouseMoveEvent, enterEvent, leaveEvent, mousePressEvent, paintEvent

UpdateChip#

class UpdateChip(QAbstractButton)source
UpdateChip(parent: QWidget)

Accent pill on the ribbon that appears when a new JBrowser version is available.

Qt overrides: enterEvent, leaveEvent, paintEvent

GalleryButton#

class GalleryButton(QAbstractButton)source
GalleryButton(parent: QWidget)

Labelled "Gallery" pill on the ribbon; highlighted while the Gallery is open.

GalleryButton.nextCheckState#

nextCheckState() -> Nonesource

Qt overrides: enterEvent, leaveEvent, paintEvent

WidthButton#

class WidthButton(QAbstractButton)source
WidthButton(parent: QWidget)

Ribbon button showing the selected card's width; click to pick 20% to full width (Alt+2 … Alt+0).

WidthButton.set_width#

set_width(frac: float | None) -> Nonesource

Qt overrides: enterEvent, leaveEvent, sizeHint, paintEvent

DownloadsButton#

class DownloadsButton(QAbstractButton)source
DownloadsButton(parent: QWidget)

Ribbon Downloads button. While files download it widens to show the percentage over a progress bar.

DownloadsButton.set_state#

set_state(fraction: float | None, dot: str | None) -> boolsource

Returns True when the button changed width (the ribbon then re-centres the address bar).

Qt overrides: hideEvent, showEvent, enterEvent, leaveEvent, sizeHint, paintEvent

TitleBar#

class TitleBar(QWidget)source
TitleBar(ctx: 'AppContext', ui: 'BrowserController', parent: QWidget)

TitleBar.refresh#

refresh() -> Nonesource

TitleBar.set_maximized#

set_maximized(maximized: bool) -> Nonesource

Qt overrides: resizeEvent, showEvent, contextMenuEvent, sizeHint

Functions#

suspicious_idn#

suspicious_idn(url: QUrl) -> boolsource

True when a host mixes Latin letters with look-alike characters from other scripts.

security_state#

security_state(ctx: 'AppContext', tab: Tab | None) -> tuple[str, str, str]source

Returns (glyph, colour token, short label) for the tab's connection.