mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-19 01:24:21 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user