Skip to content

Commit

Permalink
mobile: add lots of top padding on mobile
Browse files Browse the repository at this point in the history
and remove top panel

Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed May 16, 2024
1 parent dbc56ac commit 95c526f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ fn render_panel(ctx: &egui::Context, app: &mut Damus, timeline_ind: usize) {
}

fn render_damus_mobile(ctx: &egui::Context, app: &mut Damus) {
render_panel(ctx, app, 0);
//render_panel(ctx, app, 0);

#[cfg(feature = "profiling")]
puffin::profile_function!();
Expand All @@ -618,8 +618,14 @@ fn render_damus_mobile(ctx: &egui::Context, app: &mut Damus) {
}

fn main_panel(style: &Style) -> egui::CentralPanel {
let inner_margin = egui::Margin {
top: if crate::ui::is_mobile() { 40.0 } else { 0.0 },
left: 0.0,
right: 0.0,
bottom: 0.0,
};
egui::CentralPanel::default().frame(Frame {
inner_margin: Margin::same(0.0),
inner_margin,
fill: style.visuals.panel_fill,
..Default::default()
})
Expand Down

0 comments on commit 95c526f

Please sign in to comment.