Fork de travail pop-os/libcosmic pour contribs COSMIC
This is more general, and necessary if the custom theming is dynamically generated. Iced's builtin theme also uses `Box`ed `Fn`, or `Rc` where clone is required, so this seems reasonable. Only `Text` is left using `fn`, since it needs to be `Copy`. Hopefully that can be changed in Iced at some point. `::custom` methods are added to make these variants a little more convenient to construct. This replaces a couple `From` implementations, which are potentially problematic with a generic. |
||
|---|---|---|
| .github/workflows | ||
| .vscode | ||
| cosmic-config | ||
| examples | ||
| iced@6f6c24bc36 | ||
| res | ||
| src | ||
| .gitignore | ||
| .gitmodules | ||
| Cargo.toml | ||
| config.toml | ||
| LICENSE | ||
| README.md | ||
LIBCOSMIC
Building blocks for COSMIC applications.
Building
Libcosmic is written in pure Rust, so cargo is all you need.
cargo build
Usage
There's examples in the examples directory.
Widget library
cargo run --release --example cosmic
On Pop!_OS
sudo apt install cargo libexpat1-dev libfontconfig-dev libfreetype-dev pkg-config cmake
git clone https://github.com/pop-os/libcosmic
cd libcosmic
git submodule update --init
cargo run --release -p cosmic
If already cloned
cd libcosmic
git pull origin master
cargo run --release -p cosmic
Text rendering
cargo run --release --example text
Documentation
The documentation can be found here.
Licence
Libcosmic is licenced under the MPL-2.0