ui/column: remove move/remove column buttons on narrow

It doesn't make sense to move columns in narrow mode

Fixes: https://github.com/damus-io/notedeck/issues/960
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-07-15 08:26:53 -07:00
parent a714bef690
commit 443d356cc7
2 changed files with 52 additions and 2 deletions

View File

@@ -788,6 +788,8 @@ pub fn render_nav(
ctx: &mut AppContext<'_>,
ui: &mut egui::Ui,
) -> RenderNavResponse {
let narrow = is_narrow(ui.ctx());
if let Some(sheet_route) = app
.columns(ctx.accounts)
.column(col)
@@ -822,6 +824,8 @@ pub fn render_nav(
&[route.clone()],
col,
)
.show_move_button(!narrow)
.show_delete_button(!narrow)
.show(ui),
NavUiType::Body => render_nav_body(ui, app, ctx, route, 1, col, inner_rect),
});
@@ -858,7 +862,10 @@ pub fn render_nav(
nav.routes(),
col,
)
.show_move_button(!narrow)
.show_delete_button(!narrow)
.show(ui),
NavUiType::Body => {
if let Some(top) = nav.routes().last() {
render_nav_body(ui, app, ctx, top, nav.routes().len(), col, inner_rect)