From 4eaf17897eaf2f0c9b1b7802136709970e777d1e Mon Sep 17 00:00:00 2001 From: William Casarin Date: Fri, 9 Feb 2024 18:22:24 -0800 Subject: [PATCH] restore top panel behavior Signed-off-by: William Casarin --- src/app.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/app.rs b/src/app.rs index 611d961..ebf767c 100644 --- a/src/app.rs +++ b/src/app.rs @@ -575,20 +575,20 @@ fn timeline_view(ui: &mut egui::Ui, app: &mut Damus, timeline: usize) { fn top_panel(ctx: &egui::Context) -> egui::TopBottomPanel { // mobile needs padding, at least on android - //if is_mobile(ctx) { - let mut top_margin = Margin::default(); - top_margin.top = 50.0; + if is_mobile(ctx) { + let mut top_margin = Margin::default(); + top_margin.top = 50.0; - let frame = Frame { - inner_margin: top_margin, - fill: ctx.style().visuals.panel_fill, - ..Default::default() - }; + let frame = Frame { + inner_margin: top_margin, + fill: ctx.style().visuals.panel_fill, + ..Default::default() + }; - return egui::TopBottomPanel::top("top_panel").frame(frame); - //} + return egui::TopBottomPanel::top("top_panel").frame(frame); + } - //egui::TopBottomPanel::top("top_panel").frame(Frame::none()) + egui::TopBottomPanel::top("top_panel").frame(Frame::none()) } #[inline]