fix(ui): make modal layouts intrinsic

Pin Iced 0.15 so dialogs can measure content before distributing the resolved frame across child panels. Keep the web plugin notice compact and non-resizable.\n\nCloses #582
This commit is contained in:
Hakan Seven committed 2026-07-30 14:47:28 +03:00
1 parent 284d6ef517
commit 3ab8dc3ca5
59 files changed
+2197 -1652

No files matched your search

+15 -15
View File
@@ -332,9 +332,9 @@ fn draw_grip_marker(frame: &mut canvas::Frame, grip: &GripMarker, theme: &Theme)
};
if grip.is_hot {
frame.fill(&path, theme.extended_palette().danger.base.color);
frame.fill(&path, theme.palette().danger.base.color);
} else {
let palette = theme.extended_palette();
let palette = theme.palette();
let color = palette.primary.base.color;
frame.fill(
&path,
@@ -435,7 +435,7 @@ impl canvas::Program<Message> for SelectionCanvas {
// Filled bars in the pane_grid spacing gaps, so adjacent panes read as
// distinct viewports. Drawn first so all other overlays sit on top.
if !self.dividers.is_empty() {
let divider = theme.extended_palette().background.neutral.color;
let divider = theme.palette().background.neutral.color;
for d in &self.dividers {
let bar = canvas::Path::rectangle(
Point::new(d.x, d.y),
@@ -450,13 +450,13 @@ impl canvas::Program<Message> for SelectionCanvas {
// under the cursor, and drag a translucent ghost card along the cursor
// so the pane is visibly "moving".
if let Some(src) = self.pane_move_rect {
let accent = theme.extended_palette().primary.base.color;
let accent = theme.palette().primary.base.color;
// Source pane: dimmed + dashed-feel outline (it has been lifted).
let src_path =
canvas::Path::rectangle(Point::new(src.x, src.y), iced::Size::new(src.width, src.height));
frame.fill(
&src_path,
theme.extended_palette().background.strong.color.scale_alpha(0.28),
theme.palette().background.strong.color.scale_alpha(0.28),
);
frame.stroke(
&src_path,
@@ -515,9 +515,9 @@ impl canvas::Program<Message> for SelectionCanvas {
theme: &Theme,
) {
let base = if crossing {
theme.extended_palette().success.base.color
theme.palette().success.base.color
} else {
theme.extended_palette().primary.base.color
theme.palette().primary.base.color
};
let fill = base.scale_alpha(0.12);
let stroke = base.scale_alpha(0.9);
@@ -547,9 +547,9 @@ impl canvas::Program<Message> for SelectionCanvas {
if self.selection.poly_active && self.selection.poly_points.len() > 1 {
let base = if self.selection.poly_crossing {
theme.extended_palette().success.base.color
theme.palette().success.base.color
} else {
theme.extended_palette().primary.base.color
theme.palette().primary.base.color
};
let fill = base.scale_alpha(0.12);
let stroke = base.scale_alpha(0.9);
@@ -909,7 +909,7 @@ impl canvas::Program<Message> for SelectionCanvas {
if !over_viewcube && !over_divider && !self.pan_mode && !self.suppressed {
if let Some(cp) = self.selection.last_move_pos {
let color = theme
.extended_palette()
.palette()
.background
.base
.text
@@ -956,7 +956,7 @@ impl canvas::Program<Message> for SelectionCanvas {
// the hovered object sits on a locked layer (issue: locked
// objects are visible + snappable but not selectable/editable).
if self.hover_locked {
let warning = theme.extended_palette().warning.base;
let warning = theme.palette().warning.base;
let amber = warning.color.scale_alpha(0.98);
let dark = warning.text;
let bx = cp.x + sq + 7.0;
@@ -1005,7 +1005,7 @@ impl canvas::Program<Message> for SelectionCanvas {
}
// ── Object Snap Tracking ─────────────────────────────────────────────
let track_color = theme.extended_palette().primary.base.color.scale_alpha(0.7);
let track_color = theme.palette().primary.base.color.scale_alpha(0.7);
// The alignment line the cursor is currently locked to — drawn at its
// real angle from the acquired point through the lock and a little
// beyond, dashed so it reads as a construction guide. This covers the
@@ -2110,7 +2110,7 @@ impl DynInputCanvas {
canvas::Stroke {
width: 1.0,
style: canvas::Style::Solid(
theme.extended_palette().background.neutral.color.scale_alpha(0.9)
theme.palette().background.neutral.color.scale_alpha(0.9)
),
line_dash: canvas::LineDash { segments: &[2.0, 3.0], offset: 0 },
..Default::default()
@@ -2161,7 +2161,7 @@ impl DynInputCanvas {
}
fn box_colors(b: &DynBox, theme: &Theme) -> (Color, Color, Color) {
let palette = theme.extended_palette();
let palette = theme.palette();
if b.active {
(
palette.primary.weak.color,
@@ -2188,7 +2188,7 @@ impl DynInputCanvas {
if self.prompt.is_empty() {
return;
}
let palette = theme.extended_palette();
let palette = theme.palette();
let pw = (self.prompt.len() as f32 * DYN_CHAR_W) + DYN_PAD * 2.0;
let rect = canvas::Path::rectangle(pos, Size { width: pw, height: DYN_BOX_H });
frame.fill(&rect, palette.background.strong.color);