Reusable PyQt UI toolkit primitives for SLI desktop tools.
Project description
SLI UI Toolkit
sli-ui-toolkit is a reusable PyQt6 widget and UI-support library.
SLI stands for Shared Lightweight Interface.
It was extracted from two production apps, Improve-ImgSLI and Tkonverter. That history is still visible in some widget choices and naming, but the package is maintained as a general-purpose toolkit: host-specific behavior is kept outside the library and injected through configuration hooks.
Use it when you want:
- custom-painted compact controls;
- a unified button system;
- theme-aware widgets and flyouts;
- app-injected icons, translations, and overlay behavior.
Start Here
This file is the integration entry point, not the full reference.
- Full public API: docs/API_CATALOG.md
- Internal structure: docs/ARCHITECTURE.md
- Visual conventions: docs/DESIGN_LANGUAGE.md
- Docs index: docs/README.md
Import Layers
Use these import layers on purpose:
sli_ui_toolkitSmall top-level bootstrap surface.sli_ui_toolkit.widgetsMain public widget catalog.sli_ui_toolkit.i18nTranslation manager and helpers.sli_ui_toolkit.iconsIcon resolver configuration.sli_ui_toolkit.themeTheme manager.sli_ui_toolkit.managersFlyout and timer helpers.sli_ui_toolkit.servicesUtility services such as prewarm helpers.
If you are building app UI, most of the time you want sli_ui_toolkit.widgets.
Configuration Hooks
App-specific behavior is injected at startup:
configure_icon_resolver(...)configure_toolkit(...)configure_i18n(...)
These hooks keep the toolkit reusable while letting the host app supply:
- icon lookup;
- translation roots;
- overlay-layer resolution;
- timing constants.
Quick Start
from pathlib import Path
from PyQt6.QtWidgets import QApplication, QWidget, QVBoxLayout
from sli_ui_toolkit import FlyoutTimingConfig, configure_i18n, configure_toolkit
from sli_ui_toolkit.icons import configure_icon_resolver
from sli_ui_toolkit.theme import ThemeManager
from sli_ui_toolkit.widgets import Button, ComboBox, install_application_tooltips
app = QApplication([])
theme = ThemeManager.get_instance()
theme.register_palettes(light_palette={...}, dark_palette={...})
theme.register_qss_path(str(Path("resources/qss/app.qss")))
theme.set_theme("light", app)
configure_icon_resolver(resolver=my_icon_lookup)
configure_toolkit(
timings=FlyoutTimingConfig(
transient_auto_hide_delay_ms=300,
flyout_animation_duration_ms=150,
text_settings_flyout_animation_duration_ms=150,
),
overlay_resolver=lambda widget: getattr(widget.window(), "overlay_layer", None),
)
configure_i18n(i18n_root=Path("resources/i18n"))
install_application_tooltips(app)
window = QWidget()
layout = QVBoxLayout(window)
save_button = Button("save", text="Save", variant="primary")
mode_combo = ComboBox()
mode_combo.addItems(["Fast", "Balanced", "Quality"])
layout.addWidget(save_button)
layout.addWidget(mode_combo)
window.show()
app.exec()
Flyouts, button dropdown menus, and similar in-window surfaces use
overlay_resolver when a host app provides an overlay layer. The resolved
object should expose host, attach(widget), anchor_rect(anchor), and
clamp_rect(rect, margin=...). If no overlay layer is resolved, button dropdown
menus fall back to the top-level window and position themselves in window
coordinates. Menu surfaces are painted from flyout.background /
flyout.border; individual rows only use list_item.background.hover for the
hovered or current item.
First Widgets To Reach For
ButtonUnified icon/text/toggle/menu/scrollable button system.ComboBoxCustom-painted combo box with popup, search, and keyboard navigation.CustomLineEditThemed editable text field.SidebarDialogShellSettings/help style dialog shell.ScrollableDialogPageScrollable dialog page container.MarkdownHelpDialogReusable markdown help/documentation dialog.
Usage details live in docs/API_CATALOG.md.
Notes
ComboBoxis a custom widget, not a fullQComboBoxdrop-in replacement.- The toolkit is designed around custom-painted controls, not QSS-skinned stock widgets.
- App-specific icons and translations should stay outside the toolkit and be injected through configuration.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sli_ui_toolkit-0.2.10.tar.gz.
File metadata
- Download URL: sli_ui_toolkit-0.2.10.tar.gz
- Upload date:
- Size: 179.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
526bd15cc0e31f97e9fcf711d20db5004cd77901a71120740cffe0095db755a9
|
|
| MD5 |
bda054549750cbe342316145eedf4957
|
|
| BLAKE2b-256 |
84f5cd565f85867b8114a2267e8aa7f5ea2139e0c255008bde13ac0f5a0d4cf5
|
Provenance
The following attestation bundles were made for sli_ui_toolkit-0.2.10.tar.gz:
Publisher:
publish.yml on Loganavter/sli-ui-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sli_ui_toolkit-0.2.10.tar.gz -
Subject digest:
526bd15cc0e31f97e9fcf711d20db5004cd77901a71120740cffe0095db755a9 - Sigstore transparency entry: 1739808990
- Sigstore integration time:
-
Permalink:
Loganavter/sli-ui-toolkit@783dd384d944bb053f02ff3918d9ee444bd08ee2 -
Branch / Tag:
refs/tags/v0.2.10 - Owner: https://github.com/Loganavter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@783dd384d944bb053f02ff3918d9ee444bd08ee2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file sli_ui_toolkit-0.2.10-py3-none-any.whl.
File metadata
- Download URL: sli_ui_toolkit-0.2.10-py3-none-any.whl
- Upload date:
- Size: 247.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
246d7ba778228b7086ecfbab8fd98f18bdff09b19e0b9fda56462c6490aec672
|
|
| MD5 |
a6d2aabc3e226155075f3dd92f7891aa
|
|
| BLAKE2b-256 |
d2c1c177a08acf310072a9fa87ede70ca6cbecbec5dc23ed8d70afb6ffb6b234
|
Provenance
The following attestation bundles were made for sli_ui_toolkit-0.2.10-py3-none-any.whl:
Publisher:
publish.yml on Loganavter/sli-ui-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sli_ui_toolkit-0.2.10-py3-none-any.whl -
Subject digest:
246d7ba778228b7086ecfbab8fd98f18bdff09b19e0b9fda56462c6490aec672 - Sigstore transparency entry: 1739808994
- Sigstore integration time:
-
Permalink:
Loganavter/sli-ui-toolkit@783dd384d944bb053f02ff3918d9ee444bd08ee2 -
Branch / Tag:
refs/tags/v0.2.10 - Owner: https://github.com/Loganavter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@783dd384d944bb053f02ff3918d9ee444bd08ee2 -
Trigger Event:
release
-
Statement type: