Skip to content

Commit

Permalink
ui: add frame around note previews
Browse files Browse the repository at this point in the history
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Apr 15, 2024
1 parent a8185d9 commit d247382
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/ui/note/contents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ impl egui::Widget for NoteContents<'_> {
}
}

/// Render an inline note preview with a border. These are used when
/// notes are references within a note
fn render_note_preview(
ui: &mut egui::Ui,
app: &mut Damus,
Expand Down Expand Up @@ -74,11 +76,22 @@ fn render_note_preview(
*/
};

ui.add(
ui::Note::new(app, &note)
.actionbar(false)
.note_previews(false),
)
egui::Frame::none()
//.fill(egui::Color32::BLACK.gamma_multiply(0.2))
//
.rounding(egui::Rounding::same(10.0))
.stroke(egui::Stroke::new(
1.0,
egui::Color32::from_rgb(0x2C, 0x2C, 0x2C),
))
.show(ui, |ui| {
ui.add(
ui::Note::new(app, &note)
.actionbar(false)
.note_previews(false),
)
})
.response
}

fn render_note_contents(
Expand Down

0 comments on commit d247382

Please sign in to comment.