DEV Community

Akhouri Anmol Kumar
Akhouri Anmol Kumar

Posted on

I Built the World's Most Customizable Scientific Calculator (30+ Themes, Python + PyQt6)

The idea

Every OS ships a calculator. Every one of them looks the same, feels the same, and disappears from memory the moment you close it.

So I built ACALCU v3 — an Akhouri Systems product — a scientific calculator that's absurdly, unnecessarily customizable. Not because a calculator needs 30+ themes and per-button styling, but because it was a fun constraint to design around: how far can you push a "boring" utility app before it becomes something people actually enjoy using?

What it does

At its core, ACALCU is a standard scientific calculator: basic arithmetic, sin, cos, tan, log, √, π, percentages, and a running expression engine built on Python's math module.

On top of that core, it layers:

30+ built-in themes — Royal, Liquid Glass, Wild, Cyberpunk, Dracula, Nord, Solarized, Monokai, Windows 7 / Vista / 10, OneUI 8.0, Matrix, Rose Gold, Galaxy, Fire, Ice, Neon, Vintage, Sakura, Midnight, Forest, Candy, Terminal, Gold Dark, and more.
Per-button customization — right-click any button to change its color, font, or set a custom image/video as its background. Every button on the grid is independently styleable.
A live "Wild" theme — a small animated plant widget that visibly grows every time you run a calculation.
Calculation history — a scrollable dialog of your last 50 calculations.
Persistent config — every customization is saved to a local JSON file and reloaded on next launch.
Full keyboard support — number keys, operators, Enter/Escape, all mapped to the same input pipeline the buttons use.
Architecture

The whole thing is a single-file PyQt6 desktop app, structured around a few core pieces:

python
THEMES = {
"DEFAULT": { "app_bg": "#0a0a0a", "display_bg": "#111111", ... },
"ROYAL": { "app_bg": "#0a0800", "display_fg": "#ffd700", ... },
"LIQUID_GLASS": { "app_bg": "transparent", ... , "transparent": True },
# ...30+ more
}

Each theme is just a dict of colors, font, corner radius, and optional flags (transparent, wild). The Config class resolves the active theme plus any per-button overrides stored in customizations, and every widget re-derives its stylesheet from that at render time — so switching themes or recoloring a single button is just a style recompute, not a UI rebuild.

The calculation engine is intentionally simple:

python
funcs = {
"sin": lambda x: math.sin(math.radians(x)),
"cos": lambda x: math.cos(math.radians(x)),
"tan": lambda x: math.tan(math.radians(x)),
"log10": math.log10, "log": math.log,
"sqrt": math.sqrt, "pi": math.pi,
}

Tokens from button clicks or keyboard input get translated into a Python-evaluable expression string (with the trig functions pre-wrapped for degree input), evaluated, and pushed onto a history stack.

Per-button customization is handled by a ButtonCustomizer dialog — right-clicking a button opens a small QDialog where you can pick a color (QColorDialog), a font (QFontDialog), or attach an image/video via QFileDialog. Those overrides get merged into the button's stylesheet on top of the active theme, so you can have a Cyberpunk-themed calculator with one neon-pink = button that's actually a GIF.

What I'd do differently
The 1000+ line single file works for a personal project but I'd split themes, engine, and widgets into modules if this grows further.
Theme switching currently rebuilds the central widget — fine for a desktop app, but I'd profile this if I ever wanted smoother live-preview theme switching.
Video backgrounds on buttons are a fun gimmick but genuinely questionable UX — I kept it in anyway.
Try it
👉 https://github.com/Akhouri-Anmol-Kumar/ACALCU-v3
It's open source, built with Python 3 + PyQt6. Repo link in the comments — would genuinely love to see what themes people request or build themselves.

If you build desktop apps with PyQt/PySide, curious what your approach to theming systems like this looks like — drop it below.

ACALCU

"We Build what others forgot to fix"

Top comments (0)