Created
June 29, 2018 07:34
-
-
Save ryanmcgrath/04291b3625a7821bed010d01b6697994 to your computer and use it in GitHub Desktop.
Experiments in GUIs in Rust.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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