Skip to content

Instantly share code, notes, and snippets.

@ryanmcgrath
Created June 29, 2018 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanmcgrath/04291b3625a7821bed010d01b6697994 to your computer and use it in GitHub Desktop.
Save ryanmcgrath/04291b3625a7821bed010d01b6697994 to your computer and use it in GitHub Desktop.
Experiments in GUIs in Rust.
{
"window": {
"backgroundColor": {"r": 35, "g": 108, "b": 218},
"defaultWidth": 800,
"defaultHeight": 600
},
"root": {
"backgroundColor": {"r": 35, "g": 108, "b": 218}
},
"sidebar": {
"backgroundColor": {"r": 5, "g": 5, "b": 5},
"width": 200,
"height": 400,
"top": "root.top",
"left": "root.left",
"bottom": "root.bottom"
},
"content": {
"backgroundColor": {"r": 35, "g": 108, "b": 218},
"width": 100,
"height": 300,
"top": "root.top",
"left": "sidebar.right",
"right": "root.right",
"bottom": "root.bottom"
}
}
extern crate shinekit;
use shinekit::*;
fn main() {
shinekit::run(vec![
StyleSheet::default(include_str!("styles/default.json"))
], App::new("App", View::named("root").subviews(vec![
View::named("sidebar"),
View::named("content")
])));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment