buttons: Buttons are next to each other, padding is visual only

This commit is contained in:
Dorota Czaplejewicz
2019-10-09 20:34:46 +00:00
parent cb8d2b01af
commit 9e078be603
15 changed files with 57 additions and 94 deletions

View File

@ -189,8 +189,6 @@ fn load_layout_with_fallback(
#[derive(Debug, Deserialize, PartialEq)]
#[serde(deny_unknown_fields)]
pub struct Layout {
row_spacing: f64,
button_spacing: f64,
bounds: Bounds,
views: HashMap<String, Vec<ButtonIds>>,
#[serde(default)]
@ -345,10 +343,6 @@ impl Layout {
width: self.bounds.width,
height: self.bounds.height,
},
spacing: ::layout::Spacing {
row: self.row_spacing,
button: self.button_spacing,
},
rows: view.iter().map(|row| {
Box::new(::layout::Row {
angle: 0,
@ -545,8 +539,6 @@ mod tests {
assert_eq!(
Layout::from_file(PathBuf::from("tests/layout.yaml")).unwrap(),
Layout {
row_spacing: 0f64,
button_spacing: 0f64,
bounds: Bounds { x: 0f64, y: 0f64, width: 0f64, height: 0f64 },
views: hashmap!(
"base".into() => vec!("test".into()),