Skip to content

Commit

Permalink
Tweaked Conversion menu
Browse files Browse the repository at this point in the history
  • Loading branch information
shartrec committed Jul 20, 2024
1 parent 1616c58 commit 8112f2e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
34 changes: 17 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ strum_macros = "0.26.4"
[dependencies.iced]
git = "https://github.com/iced-rs/iced.git"
version = "0.13.0-dev"
features = ["advanced", "multi-window"]
features = ["advanced"]

[dependencies.iced_aw]
git = "https://github.com/iced-rs/iced_aw.git"
Expand Down
2 changes: 1 addition & 1 deletion src/conversions/energy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub static GIGAJOULE: Unit = Unit {

// Imperial units
pub static BRITISH_THERMAL_UNIT: Unit = Unit {
name: "British thermal unit",
name: "BTU",
dimension: Dimension::Energy,
system: System::Imperial,
to_base: Some(|v| v * 1055.05585262),
Expand Down
4 changes: 2 additions & 2 deletions src/ui/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ fn menu_unit_from(dimension: &Dimension) -> Menu<'static, Message, Theme, Rende
menu_unit_to(dimension, *unit)
));
}
Menu::new(items).offset(0.0).spacing(2.0).max_width(160.0)
Menu::new(items).offset(0.0).spacing(2.0).max_width(150.0)

}

Expand All @@ -174,7 +174,7 @@ fn menu_unit_to(dimension: &Dimension, from: &'static Unit) -> Menu<'static, Mes
menu_item(unit.to_string(), Message::ConvertPerform(&from, *to)),
));
}
Menu::new(items).offset(0.0).spacing(2.0).max_width(150.0)
Menu::new(items).offset(0.0).spacing(2.0).max_width(140.0)
}

fn menu_item(label: String, msg: Message) -> Element<'static, Message> {
Expand Down

0 comments on commit 8112f2e

Please sign in to comment.