Crate iced_style_config

Crate iced_style_config 

Source
Expand description

Create Iced style sheets from configuration files.

§Usage

Add this to your Cargo.toml:

[dependencies]
iced = "0.4"
iced_style_config = "0.2"

To disable hot reloading support:

[dependencies]
iced = "0.4"
iced_style_config = { version = "0.2", default-features = false }

Note: Hot reloading on WebAssembly is not yet supported.

Compiler support: requires the latest stable rustc

§Examples

cargo run --example hot_reloading

§Schemas for configuration files

The schema.json is the JSON schemas for the configuration files, and when combined with an extension of the editor that supports completion using the JSON schema, completion can be enabled.

§Visual Studio Code

In VS Code, you can enable completion and validation by installing the Even Better TOML extension and using the evenBetterToml.schema.associations configuration object in settings.json.

For example:

{
  "evenBetterToml.schema.associations": {
    ".*_theme\\.toml": "https://raw.githubusercontent.com/taiki-e/iced_style_config/main/schema.json",
  }
}

Re-exports§

pub use reloadable::ReloadableTheme;
pub use widget::*;

Modules§

color
reloadablehot-reloading
widget

Structs§

Error
An error that occurred during parsing the configuration file.
Theme
An Iced style sheet.

Type Aliases§

Result
Alias for a Result with the error type iced_style_config::Error.