Publish in-progress navigation source and independent canvas reviews

This commit is contained in:
2026-09-12 06:58:08 -07:00
parent 7aa007b077
commit fdf756e6a4
48 changed files with 16281 additions and 125 deletions
+20 -2
View File
@@ -5,6 +5,7 @@ use iced::widget::{Column, text_input};
use std::collections::BTreeSet;
pub(crate) mod contextual;
mod direct;
mod usages;
mod view;
use direct::Input;
pub(crate) use direct::{
@@ -986,6 +987,7 @@ struct Graph<'a> {
ordered: bool,
size: Size,
selected: Id,
selected_preview: Option<OccurrenceEndpoint>,
scale: f32,
}
impl<'a> Graph<'a> {
@@ -1319,6 +1321,7 @@ impl<'a> Graph<'a> {
ordered: !order.is_empty(),
size,
selected,
selected_preview: None,
scale: 1.,
}
}
@@ -1577,10 +1580,25 @@ impl canvas::Program<Message> for Graph<'_> {
}
for (id, name) in &n.preview {
let r = mini[id];
f.fill_rectangle(r.position(), r.size(), Color::WHITE);
let selected = self.selected_preview.as_ref() == Some(id);
f.fill_rectangle(
r.position(),
r.size(),
if selected {
Color::from_rgb8(224, 247, 242)
} else {
Color::WHITE
},
);
f.stroke(
&Path::rectangle(r.position(), r.size()),
Stroke::default().with_color(style::LINE),
Stroke::default()
.with_color(if selected {
style::TEAL
} else {
style::LINE
})
.with_width(if selected { 2.5 } else { 1. }),
);
draw_text(
&mut f,