Fix clipped layer header icons

This commit is contained in:
Dandaedre 2026-11-18 11:59:28 +01:00
parent 13796190cf
commit f27baa3f41
5 changed files with 11 additions and 6 deletions

2
Cargo.lock generated
View File

@ -602,7 +602,7 @@ dependencies = [
[[package]]
name = "canvas-pilot"
version = "0.9.47"
version = "0.9.48"
dependencies = [
"base64 0.22.1",
"craft-dwg",

View File

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

View File

@ -1597,7 +1597,7 @@ impl Editor {
);
if toolbar_icon(
ui,
Rect::from_min_size(ink.point(w - 28.0, -5.0), Vec2::new(28.0, 24.0)),
Rect::from_min_size(ink.point(w - 28.0, 0.0), Vec2::new(28.0, 24.0)),
"Manage layers and folders",
ToolbarIcon::ManageLayers,
)
@ -1607,7 +1607,7 @@ impl Editor {
}
if toolbar_icon(
ui,
Rect::from_min_size(ink.point(w - 60.0, -5.0), Vec2::new(28.0, 24.0)),
Rect::from_min_size(ink.point(w - 60.0, 0.0), Vec2::new(28.0, 24.0)),
"Add reference image",
ToolbarIcon::AddImage,
)

View File

@ -578,7 +578,7 @@ impl Editor {
pub(super) fn layer_tree_header(&mut self, ui: &mut egui::Ui, ink: &Ink, width: f32) {
if toolbar_icon(
ui,
Rect::from_min_size(ink.point(width - 92.0, -5.0), Vec2::new(28.0, 24.0)),
Rect::from_min_size(ink.point(width - 92.0, 0.0), Vec2::new(28.0, 24.0)),
"Create folder",
ToolbarIcon::AddFolder,
)
@ -600,7 +600,7 @@ impl Editor {
.add_enabled_ui(self.layout.layers().len() < 256, |ui| {
toolbar_icon(
ui,
Rect::from_min_size(ink.point(width - 124.0, -5.0), Vec2::new(28.0, 24.0)),
Rect::from_min_size(ink.point(width - 124.0, 0.0), Vec2::new(28.0, 24.0)),
"Add layer",
ToolbarIcon::AddLayer,
)

View File

@ -4,6 +4,11 @@
## Unreleased
### v0.9.48
- Keep the four layer-header buttons inside the sidebar content area so their
icons are no longer clipped along the top edge.
### v0.9.47
- Detect optional software at startup and use the same executable paths for