Tighten input reference picture row spacing

This commit is contained in:
Dandaedre 2026-11-18 17:44:44 +01:00
parent b4e17e7844
commit eb1f7e856b
5 changed files with 17 additions and 9 deletions

2
Cargo.lock generated
View File

@ -602,7 +602,7 @@ dependencies = [
[[package]]
name = "canvas-pilot"
version = "0.10.0-rc.1"
version = "0.10.0-rc.2"
dependencies = [
"base64 0.22.1",
"craft-dwg",

View File

@ -4,7 +4,7 @@ default-members = ["crates/canvas-pilot"]
resolver = "3"
[workspace.package]
version = "0.10.0-rc.1"
version = "0.10.0-rc.2"
edition = "2024"
license = "MIT"
repository = "https://proxy.dandaedre.com/gitea/idle-org/canvas-pilot"

View File

@ -1,5 +1,6 @@
use super::*;
use canvas_pilot::device_capture;
pub(super) const INPUT_REFERENCE_ROW_HEIGHT: f32 = 32.0;
type CaptureTarget = (usize, usize, u32, String);
type CaptureJob = std::sync::mpsc::Receiver<Result<super::super::reference::Reference, String>>;
@ -551,9 +552,12 @@ impl Editor {
else {
continue;
};
let row_y = y + 44. + row as f32 * 44.;
let row_y = y + 44. + row as f32 * INPUT_REFERENCE_ROW_HEIGHT;
row += 1;
let rect = Rect::from_min_size(ink.point(0., row_y), Vec2::new(w, 38.));
let rect = Rect::from_min_size(
ink.point(0., row_y),
Vec2::new(w, INPUT_REFERENCE_ROW_HEIGHT - 6.),
);
ui.scope_builder(egui::UiBuilder::new().max_rect(rect), |ui| {
ui.horizontal(|ui| {
ui.checkbox(&mut p.enabled, "")

View File

@ -1596,12 +1596,11 @@ impl Editor {
} else {
self.references.len() + 1
};
let row_offset = (row_count as f32 - 2.0) * 44.0
- input_reference_rows as f32 * (44.0 - capture_ui::INPUT_REFERENCE_ROW_HEIGHT);
let palette = theme::palette(ui.ctx());
let (r, _) = ui.allocate_exact_size(
Vec2::new(
ui.available_width(),
1071.0 + (row_count as f32 - 2.0) * 44.0,
),
Vec2::new(ui.available_width(), 1071.0 + row_offset),
egui::Sense::hover(),
);
let ink = Ink::new(ui, r);
@ -1828,7 +1827,7 @@ impl Editor {
28.0 + (layer_row_count + 1 + fixed_reference_rows) as f32 * 44.0,
w,
);
let r = r.translate(Vec2::new(0.0, (row_count as f32 - 2.0) * 44.0));
let r = r.translate(Vec2::new(0.0, row_offset));
let ink = Ink::new(ui, r);
ink.line([0.0, 130.0], [w, 130.0], palette.line);
if self.layout.selected_indices().len() > 1 {

View File

@ -4,6 +4,11 @@
## Unreleased
### v0.10.0-rc.2
- Tighten input reference picture rows from 44 to 32 pixels apart while retaining
the existing button size. Reclaim the space below the list as well.
## v0.10.0-rc.1 — 2026-11-18
First release candidate for the 0.10 minor release, collecting the changes below.