Blocks palette: tabs, options, drag insertion and -INSERT

Rebuild the Blocks palette with Current Drawing / Recent / Favorites /
Libraries tabs, wildcard filter, six views, insertion options, click and
drop insertion and a block context menu. INSERT opens the palette, the
new -INSERT runs on the command line, the ribbon Insert button becomes a
block gallery, and BLOCKMRULIST, BLOCKREDEFINEMODE, BLOCKNAVIGATE,
BLOCKSTATE, EXPLMODE and INSNAME are added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-01 11:17:38 +03:00
1 parent 3dcebf0dc6
commit 0826101c5e
49 files changed
+3401 -573

No files matched your search

+13 -2
View File
@@ -2316,7 +2316,17 @@ bg={bg_ms:.1}ms n={view_count}"
} else {
Vec::new()
};
let dropdown_layer: Element<'_, Message> = self
let gallery_open = open_dropdown == Some(crate::modules::insert::insert_block::GALLERY_ID)
&& !self.tabs[self.active_tab].is_start;
let dropdown_layer: Element<'_, Message> = if gallery_open {
self.ribbon.place_dropdown(
crate::modules::insert::insert_block::GALLERY_ID,
crate::ui::window::block_palette::gallery(&self.block_palette),
crate::ui::window::block_palette::GALLERY_W,
self.win_size.0,
)
} else {
self
.ribbon
.dropdown_overlay(
&undo_labels,
@@ -2325,7 +2335,8 @@ bg={bg_ms:.1}ms n={view_count}"
self.tabs[self.active_tab].is_start,
&self.recent_colors,
)
.unwrap_or_else(|| iced::widget::Space::new().width(0).height(0).into());
.unwrap_or_else(|| iced::widget::Space::new().width(0).height(0).into())
};
let snap_override_layer: Element<'_, Message> = if let Some(pos) = self.snap_override_popup
{