Remove rounding from new LTN panels. [rebuild] [release]
+use geom::CornerRadii;
use widgetry::{
- lctrl, EventCtx, HorizontalAlignment, Key, Line, Outcome, Panel, PanelBuilder, PanelDims,
- VerticalAlignment, Widget,
+ lctrl, CornerRounding, EventCtx, HorizontalAlignment, Key, Line, Outcome, Panel, PanelBuilder,
+ PanelDims, VerticalAlignment, Widget,
};
use crate::{App, BrowseNeighborhoods, Transition};
pub fn app_top_panel(ctx: &mut EventCtx, app: &App) -> Panel {
- Panel::new_builder(Widget::row(vec![
+ Panel::new_builder(
+ Widget::row(vec![
map_gui::tools::home_btn(ctx),
Line("Low traffic neighborhoods")
.small_heading()
@@ -19,7 +21,14 @@ pub fn app_top_panel(ctx: &mut EventCtx, app: &App) -> Panel {
.hotkey(lctrl(Key::F))
.build_widget(ctx, "search")
.centered_vert(),
- ]))
+ ])
+ .corner_rounding(CornerRounding::CornerRadii(CornerRadii {
+ top_left: 0.0,
+ bottom_left: 0.0,
+ bottom_right: 0.0,
+ top_right: 0.0,
+ })),
+ )
.aligned(HorizontalAlignment::Left, VerticalAlignment::Top)
.dims_width(PanelDims::ExactPercent(1.0))
.build(ctx)
@@ -53,7 +62,14 @@ pub fn handle_top_panel(ctx: &mut EventCtx, app: &App, panel: &mut Panel) -> Opt
pub fn left_panel_builder(ctx: &EventCtx, top_panel: &Panel, contents: Widget) -> PanelBuilder {
let top_height = top_panel.panel_dims().height;
- Panel::new_builder(contents)
+ Panel::new_builder(
+ contents.corner_rounding(CornerRounding::CornerRadii(CornerRadii {
+ top_left: 0.0,
+ bottom_left: 0.0,
+ bottom_right: 0.0,
+ top_right: 0.0,
+ })),
+ )
.aligned(
HorizontalAlignment::Percent(0.0),
VerticalAlignment::Below(top_height),
