notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 4eaf17897eaf2f0c9b1b7802136709970e777d1e
parent f323fe7379be1b39f939c330d026cf4ae59e6757
Author: William Casarin <jb55@jb55.com>
Date:   Fri,  9 Feb 2024 18:22:24 -0800

restore top panel behavior

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/app.rs | 24++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git 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; - - let frame = Frame { - inner_margin: top_margin, - fill: ctx.style().visuals.panel_fill, - ..Default::default() - }; + if is_mobile(ctx) { + let mut top_margin = Margin::default(); + top_margin.top = 50.0; - return egui::TopBottomPanel::top("top_panel").frame(frame); - //} + let frame = Frame { + inner_margin: top_margin, + fill: ctx.style().visuals.panel_fill, + ..Default::default() + }; + + 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]