Skip to content

Commit

Permalink
fix colors again
Browse files Browse the repository at this point in the history
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Jun 12, 2024
1 parent 24d400d commit 5100070
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ui/note/contents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fn render_note_preview(
};

egui::Frame::none()
.fill(ui.visuals().noninteractive().bg_fill)
.fill(ui.visuals().noninteractive().weak_bg_fill)
.inner_margin(egui::Margin::same(8.0))
.outer_margin(egui::Margin::symmetric(0.0, 8.0))
.rounding(egui::Rounding::same(10.0))
Expand Down
17 changes: 12 additions & 5 deletions src/ui/note/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ pub struct NoteResponse {

impl<'a> View for Note<'a> {
fn ui(&mut self, ui: &mut egui::Ui) {
if self.app.textmode {
self.textmode_ui(ui);
} else {
self.show(ui);
}
self.show(ui);
}
}

Expand Down Expand Up @@ -260,6 +256,17 @@ impl<'a> Note<'a> {
}

pub fn show(&mut self, ui: &mut egui::Ui) -> NoteResponse {
if self.app.textmode {
NoteResponse {
response: self.textmode_ui(ui),
action: None,
}
} else {
self.show_standard(ui)
}
}

fn show_standard(&mut self, ui: &mut egui::Ui) -> NoteResponse {
#[cfg(feature = "profiling")]
puffin::profile_function!();
let note_key = self.note.key().expect("todo: support non-db notes");
Expand Down

0 comments on commit 5100070

Please sign in to comment.