Remove empty inspector scroll range

This commit is contained in:
Dandaedre 2026-11-19 14:50:29 +01:00
parent d55a105a92
commit 97df9bd164
5 changed files with 20 additions and 25 deletions

2
Cargo.lock generated
View File

@ -602,7 +602,7 @@ dependencies = [
[[package]]
name = "canvas-pilot"
version = "0.10.0-rc.18"
version = "0.10.1"
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.18"
version = "0.10.1"
edition = "2024"
license = "MIT"
repository = "https://proxy.dandaedre.com/gitea/idle-org/canvas-pilot"

View File

@ -1571,9 +1571,14 @@ impl Editor {
};
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 details_height = match self.layout.selected_indices().len() {
0 => 220.0,
1 => 958.0,
_ => 1071.0,
};
let palette = theme::palette(ui.ctx());
let (r, _) = ui.allocate_exact_size(
Vec2::new(ui.available_width(), 1071.0 + row_offset),
Vec2::new(ui.available_width(), details_height + row_offset),
egui::Sense::hover(),
);
let ink = Ink::new(ui, r);
@ -2103,16 +2108,6 @@ impl Editor {
ink.text(
0.0,
663.0,
&tr(ink.painter.ctx(), "ui.visible-box-center-position"),
11.0,
palette.cyan,
);
let [h, v] = g.center();
ink.field(0.0, 693.0, half, "Horizontal · from left", &number(h));
ink.field(half + 12.0, 693.0, half, "Vertical · from top", &number(v));
ink.text(
0.0,
776.0,
&tr(
ink.painter.ctx(),
"ui.layer-properties-crops-provisional-device-mapping",
@ -2120,17 +2115,17 @@ impl Editor {
12.0,
palette.muted,
);
ink.button(0.0, 808.0, w, "Copy layer values", true);
if click(ui, &ink, [0.0, 808.0, w, 34.0], "copy-values") {
ink.button(0.0, 695.0, w, "Copy layer values", true);
if click(ui, &ink, [0.0, 695.0, w, 34.0], "copy-values") {
self.copy(ui.ctx());
}
ink.button(0.0, 857.0, w, "Paste layer(s) values", false);
if click(ui, &ink, [0.0, 857.0, w, 34.0], "paste-button") {
ink.button(0.0, 744.0, w, "Paste layer(s) values", false);
if click(ui, &ink, [0.0, 744.0, w, 34.0], "paste-button") {
self.open_paste(String::new());
}
ink.text(
0.0,
912.0,
799.0,
&tr(
ink.painter.ctx(),
"ui.or-ctrl-cmd-v-with-the-viewport-focused",

View File

@ -143,13 +143,6 @@ impl Ink {
);
self.text(x + 12.0, y + 9.0, label, 13.0, palette.text);
}
fn field(&self, x: f32, y: f32, w: f32, label: &str, value: &str) {
let palette = theme::palette(self.painter.ctx());
self.text(x, y, label, 12.0, palette.muted);
self.card(x, y + 23.0, w, 42.0, palette.field, palette.line);
self.text(x + 12.0, y + 34.0, value, 18.0, palette.text);
}
}
const SCREEN_LABEL_TOP: f32 = 24.0;

View File

@ -4,6 +4,13 @@
## Unreleased
### v0.10.1
- Size the right inspector to its visible empty/reference message when no layer is
selected, removing the long blank scroll range while retaining scrolling for
layer properties and long layer/reference lists. Remove the duplicated read-only
**Visible box / center position** block and pull the copy/paste actions upward.
## v0.10.0-rc.18 — 2026-11-19
Published release candidate collecting the extreme-zoom performance fix and