Skip to main content

si-ui

Reusable dark-themed PyQt5 components for Scientific Instruments desktop tools.

Built on a Catppuccin Mocha-inspired colour palette, si-ui gives every SI app a consistent, modern look out of the box.


Features

Component Description
apply_dark_theme(app) Apply the Fusion dark palette to any QApplication
SI_DARK_STYLE Comprehensive QSS stylesheet (buttons, inputs, tables, scrollbars, …)
COLORS Dict of named Catppuccin Mocha hex values
SplashScreen Animated GIF (or text-fallback) splash window
PlotCanvas Dark-themed matplotlib FigureCanvas with scatter-point tracking
SIBaseApp Three-panel QMainWindow base class with convenience helpers

Installation

pip install si-ui

Local / editable install

git clone https://github.com/<your-org>/si_ui.git
cd si_ui
pip install -e .

Quick Start

import sys
from PyQt5.QtWidgets import QApplication, QWidget, QLabel
from si_ui import apply_dark_theme, SI_DARK_STYLE, SIBaseApp

class MyTool(SIBaseApp):
    def create_left_panel(self) -> QWidget:
        panel, layout = self.make_panel()
        layout.addWidget(QLabel("Inputs go here"))
        layout.addStretch()
        return panel

    def create_center_panel(self) -> QWidget:
        panel, layout = self.make_panel()
        layout.addWidget(QLabel("Main content"))
        layout.addStretch()
        return panel

    def create_right_panel(self) -> QWidget:
        panel, layout = self.make_panel()
        layout.addWidget(QLabel("Results"))
        layout.addStretch()
        return panel

app = QApplication(sys.argv)
apply_dark_theme(app)
window = MyTool(title="My SI Tool", min_size=(1000, 550))
window.show()
sys.exit(app.exec_())

Splash Screen

from si_ui import SplashScreen

splash = SplashScreen(
    title="MY APP",
    subtitle="Loading…",
    gif_data=base64_gif_string,   # or None for text fallback
)
splash.finished.connect(show_main_window)
splash.show()

Plot Canvas

from si_ui import PlotCanvas

canvas = PlotCanvas(parent=self, width=6, height=4,
                    xlabel="Frequency (Hz)", ylabel="Impedance (Ω)")
canvas.axes.plot(x_data, y_data, color=canvas.line_color)
canvas.add_point(x, y)        # highlighted scatter point
canvas.draw()

Requirements

  • Python ≥ 3.10
  • PyQt5 ≥ 5.15
  • matplotlib ≥ 3.5

License

MIT

Metadata

Release files for si-ui 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for si-ui 1.0.1
File Size Uploaded
si_ui-1.0.1.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for si-ui 1.0.1
File Interpreter ABI Platform
si_ui-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 19.8 kB

Release files / si_ui-1.0.1.tar.gz

Download URL si_ui-1.0.1.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
71d1b3c5fa0e7c15fbd9c927a1841d4c2d1d62037f9ea4f8ec2b0aa319e0019a
BLAKE2b-256 checksum
How to use checksums
a24671b671712161d35f38f8d023a6a5e87a93e65a80f6de8feac45e5ba991cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release files / si_ui-1.0.1-py3-none-any.whl

Download URL si_ui-1.0.1-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f820d8d87b8892eca19dafb2fe1823a93526a4fcf9f8f9f4863f8da3d7669cdc
BLAKE2b-256 checksum
How to use checksums
51afa13d5fa1df1a7569b76fd41c105596a045cb4301ddca6e926f27379bc502
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page