Shared Material You theme, icon font and base QML components for SanarDE.
  • C++ 67.2%
  • CMake 14.6%
  • QML 8.3%
  • Shell 6.7%
  • C 3.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-25 20:37:43 +05:00
cmake build: add install rules and CMake package 2026-10-25 14:28:26 +05:00
resources feat: add icon font, Icons and base components 2026-10-25 14:28:25 +05:00
src feat: expose whether Seurat colors are active 2026-10-25 20:37:43 +05:00
tools feat: add icon font, Icons and base components 2026-10-25 14:28:25 +05:00
.gitignore chore: add license and gitignore 2026-10-25 14:28:25 +05:00
CMakeLists.txt feat: add theme, palettes and Seurat client 2026-10-25 14:28:25 +05:00
CONTRIBUTING.md docs: add README and CONTRIBUTING 2026-10-25 14:28:26 +05:00
LICENSE chore: add license and gitignore 2026-10-25 14:28:25 +05:00
README.md docs: add repository mirrors note to README 2026-10-25 14:35:26 +05:00

Sanar Style

Note

Repository Mirrors

  • git.nuros.org (sanarde/style): primary, self-hosted Forgejo instance, accounts restricted to the core team.
  • GitHub (sanarde/style): mirror for external contributors. Issues and Pull Requests opened here are welcome and are reviewed and processed by the core team.

About

Shared Material You theme, icon font and base QML components for SanarDE applications.

Dependencies

  • Qt 6.8 or newer (Core, Gui, Quick, DBus)
  • CMake 3.21 or newer
  • A C++20 compiler

Optional at run time:

  • Sanar Seurat (seuratd), for system colors

Build

cmake -S . -B build -G Ninja
cmake --build build
cmake --install build --prefix <prefix>

The install step puts the library in <prefix>/lib, the headers in <prefix>/include/sanar-style, the CMake package in <prefix>/lib/cmake/SanarStyle and the QML module in <prefix>/lib/qt6/qml/Sanar/Style. Use -DSANAR_STYLE_QMLDIR=<path>, relative to the prefix, to change the QML module location. When the prefix is not a system one, set QML_IMPORT_PATH=<prefix>/lib/qt6/qml when running applications that use the module.

Usage

In CMake:

find_package(SanarStyle REQUIRED)
target_link_libraries(app PRIVATE SanarStyle::sanar-style)

In the application entry point, after creating the QGuiApplication:

#include <Style.h>

SanarStyle::init();

SanarStyle::init() loads the bundled fonts and sets the application font. In QML:

import Sanar.Style

The module provides the Theme and Icons singletons and the Icon and IconButton components.

Colors

When seuratd is running on the session bus (org.nuros.sanar.seurat), Theme uses its color scheme and follows changes without a restart. Without the daemon, Theme uses a palette in the light or dark variant that matches the system.

Palettes

Built-in palettes are in resources/palettes. Additional palettes are read from $XDG_DATA_HOME/sanar/palettes/*.json (usually ~/.local/share/sanar/palettes). A file with the id of a built-in palette replaces it. Files with a missing or invalid color are ignored.

A palette file has an id, a name (a string or an object keyed by language code with an en fallback) and two color tables, light and dark. Each table must contain all keys listed in resources/palettes/10-teal.json, with colors written as #RRGGBB.

Acknowledgments

Font files and license texts are in resources/fonts. The icon font is a subset; to change the icon set, edit tools/icon-names.txt and run tools/subset-icons.sh with the full font and codepoints file.

License

GNU General Public License v3.0. See LICENSE.