1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
use conrod::color::{self, Color}; #[doc = "Configuration for the GUI. Check source for what the defaults are. **Note**: ALWAYS add `..Default::default()` when creating a Config since I may add more configuration options and I will consider it a non breaking change."] pub struct Config { #[doc = "Background color"] pub canvas_color: Color, #[doc = "Input color"] pub input_color: Color, #[doc = "Color of unselected options in the menu"] pub unselected_color: Color, #[doc = "Color of selected option in the menu"] pub selected_color: Color, #[doc = "Size of border around input"] pub input_border: f64, #[doc = "Color of border around input"] pub input_border_color: Color, #[doc = "Size of input box"] pub input_size: [f64; 2], #[doc = "Size of the output list"] pub output_size: [f64; 2], #[doc = "Padding above input"] pub input_top_padding: f64, #[doc = "Padding between input and output"] pub output_top_padding: f64, #[doc = "Path to a .ttf file with the font to use"] pub font: String, #[doc = "Disable escape to exit the menu - because it crashes on i3-gaps"] pub disable_esc: bool, } impl Default for Config { fn default() -> Config { Config { canvas_color: color::BLACK, input_color: color::BLUE, unselected_color: color::WHITE, selected_color: color::RED, input_border: 1.0, input_border_color: color::BLACK, input_size: [200.0, 25.0], output_size: [200.0, 1000.0], input_top_padding: 0.0, output_top_padding: 0.0, font: "/usr/share/fonts/TTF/Ubuntu-M.ttf".into(), disable_esc: false, } } }