The dock takes production 0.24.1's frame: block panel tabs on canvas strips with the column bars 14 points high, the tool column the only card with a square canvas strip on top, docks flush against the canvas with framed icon columns and square docked flyouts, the open panel's icon on the control surface; the status bar's rotation and artboard selects are filled

This commit is contained in:
bflatastic
2026-11-25 11:31:44 +07:00
parent a4ee8547b1
commit 3bf83d7361
3 changed files with 16 additions and 6 deletions
+5 -3
View File
@@ -8,7 +8,7 @@ use craft::ui::display::{Divider, Elide, Shade, Text};
use craft::ui::form::Field;
use craft::ui::layout_components::Row;
use craft::ui::menu::Menu;
use craft::ui::pickers::Select;
use craft::ui::pickers::{Select, SelectLook};
use craft::ui::style::TypeRole;
use craft::ui::text::ZoomField;
@@ -73,7 +73,7 @@ pub fn status_bar(app: &mut VectorcraftApp, ui: &mut Ui) {
}
Field::new(tl!("Rotation")).side(SideLabel::new().kind(LabelKind::Hidden)).show(ui, |ui, _| {
// Entries are keyed by index: an angle is not a hashable value.
rotate_to = Select::new(tl!("Rotation"), Bind::given(turned), &angles).show(ui).value().copied();
rotate_to = Select::new(tl!("Rotation"), Bind::given(turned), &angles).look(SelectLook::Filled).show(ui).value().copied();
});
Divider::vertical().show(ui);
for (icon, to, tip, enabled) in
@@ -84,7 +84,9 @@ pub fn status_bar(app: &mut VectorcraftApp, ui: &mut Ui) {
}
}
Field::new(tl!("Artboard")).side(SideLabel::new().kind(LabelKind::Hidden)).show(ui, |ui, _| {
if let Some(i) = Select::new(tl!("Artboard"), Bind::given(cur), &boards).enabled(nab > 0).show(ui).value().copied() {
if let Some(i) =
Select::new(tl!("Artboard"), Bind::given(cur), &boards).look(SelectLook::Filled).enabled(nab > 0).show(ui).value().copied()
{
go = Some(json!(i));
}
});
+10 -3
View File
@@ -22,8 +22,8 @@ use craft::behavior::{Axis, DockSide, IconId};
use craft::ui::buttons::IconButton;
use craft::ui::contract::{Bind, BodyCx, PlainData, Show as _, Tracked};
use craft::ui::docking::{
DockCommands, DockConfig, DockEvent, DockGrid, DockPanels, DockScene, DockSizes, DockTo, DragUnit, FloatSpace, GroupAt, HidePanels, PanelKey,
PanelSpec, PanelSpecs, actions as command_actions, move_actions, request_actions,
ColumnCards, DockCommands, DockConfig, DockEvent, DockGrid, DockPanels, DockScene, DockSizes, DockTo, DragUnit, FloatSpace, GroupAt, HidePanels,
PanelKey, PanelSpec, PanelSpecs, actions as command_actions, move_actions, request_actions,
};
use craft::ui::menu::PanelRow;
use craft::ui::patterns::dock::DockArea;
@@ -31,6 +31,7 @@ use craft::ui::primitives::IconSpec;
use craft::ui::runtime::commands::CommandRef;
use craft::ui::runtime::frame::{ChromeToggle, request_chrome_toggle};
use craft::ui::shell::chrome_state;
use craft::ui::tabs::PanelTabLook;
use serde_json::{Value, json};
use crate::VectorcraftApp;
@@ -1316,7 +1317,13 @@ pub(crate) fn show(app: &mut VectorcraftApp, ui: &mut egui::Ui, keeps_tools: boo
Bind::bound(&mut workspace),
&specs,
&mut panels,
DockConfig::default().panel_menu_always(true).panel_menu_icon(IconId::new("menu")).floating_rounded_body(true),
DockConfig::default()
.panel_menu_always(true)
.panel_menu_icon(IconId::new("menu"))
.floating_rounded_body(true)
.tab_look(PanelTabLook::Block)
.column_cards(ColumnCards::Stepped)
.flush_docks(true),
)
.hide(hide)
.flyout(Bind::bound(&mut flyout));
+1
View File
@@ -156,6 +156,7 @@ const SIZES: &[u8] = br#"{
"size.control.md": 26,
"size.rail.width": 38,
"size.dock.column": 310,
"size.bar.column": 14,
"size.panel_header": 33,
"size.bar.tab": 35,
"size.bar.tab_large": 44,