Align Midra status bar controls in a shared row
This commit is contained in:
parent
6dc5385eda
commit
5c57669831
|
|
@ -3270,70 +3270,44 @@ impl Editor {
|
|||
if blocked {
|
||||
ui.disable();
|
||||
}
|
||||
let r = ui.max_rect();
|
||||
let ink = Ink::new(ui, r);
|
||||
ink.painter
|
||||
.circle_filled(ink.point(24.0, 17.0), 3.0, palette.cyan);
|
||||
ink.text(
|
||||
36.0,
|
||||
10.0,
|
||||
if self.device.online() {
|
||||
"ONLINE"
|
||||
} else {
|
||||
"OFFLINE"
|
||||
},
|
||||
11.0,
|
||||
if self.device.online() {
|
||||
palette.cyan
|
||||
} else {
|
||||
palette.muted
|
||||
},
|
||||
);
|
||||
let row = ui.max_rect().shrink2(Vec2::new(18.0, 0.0));
|
||||
ui.scope_builder(
|
||||
egui::UiBuilder::new().max_rect(Rect::from_min_size(
|
||||
r.min + Vec2::new(104.0, 5.0),
|
||||
Vec2::new(130.0, 25.0),
|
||||
)),
|
||||
egui::UiBuilder::new()
|
||||
.max_rect(row)
|
||||
.layout(egui::Layout::left_to_right(egui::Align::Center)),
|
||||
|ui| {
|
||||
ui.spacing_mut().item_spacing.x = 10.0;
|
||||
ui.spacing_mut().interact_size.y = 24.0;
|
||||
let online = self.device.online();
|
||||
let status_color = if online { palette.cyan } else { palette.muted };
|
||||
let (dot, _) =
|
||||
ui.allocate_exact_size(Vec2::splat(6.0), egui::Sense::hover());
|
||||
ui.painter().circle_filled(dot.center(), 3.0, status_color);
|
||||
ui.label(
|
||||
egui::RichText::new(if online { "ONLINE" } else { "OFFLINE" })
|
||||
.size(11.0)
|
||||
.color(status_color),
|
||||
);
|
||||
self.midra_apply_button(ui);
|
||||
},
|
||||
);
|
||||
ui.scope_builder(
|
||||
egui::UiBuilder::new().max_rect(Rect::from_min_size(
|
||||
r.min + Vec2::new(212.0, 5.0),
|
||||
Vec2::new(160.0, 25.0),
|
||||
)),
|
||||
|ui| {
|
||||
self.midra_send_button(ui);
|
||||
},
|
||||
);
|
||||
ui.scope_builder(
|
||||
egui::UiBuilder::new().max_rect(Rect::from_min_size(
|
||||
r.min + Vec2::new(382.0, 5.0),
|
||||
Vec2::new(145.0, 25.0),
|
||||
)),
|
||||
|ui| {
|
||||
self.midra_load_button(ui);
|
||||
self.midra_scope_picker(ui);
|
||||
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
|
||||
ui.add(
|
||||
egui::Label::new(
|
||||
egui::RichText::new(format!(
|
||||
"Screen pixels / {} × {}",
|
||||
self.layout.formats().output[0],
|
||||
self.layout.formats().output[1]
|
||||
))
|
||||
.size(12.0)
|
||||
.color(palette.muted),
|
||||
)
|
||||
.truncate(),
|
||||
);
|
||||
});
|
||||
},
|
||||
);
|
||||
ui.scope_builder(
|
||||
egui::UiBuilder::new().max_rect(Rect::from_min_size(
|
||||
r.min + Vec2::new(540.0, 5.0),
|
||||
Vec2::new(180.0, 25.0),
|
||||
)),
|
||||
|ui| self.midra_scope_picker(ui),
|
||||
);
|
||||
ink.text(
|
||||
r.width() - 278.0,
|
||||
10.0,
|
||||
&format!(
|
||||
"Screen pixels / {} × {}",
|
||||
self.layout.formats().output[0],
|
||||
self.layout.formats().output[1]
|
||||
),
|
||||
12.0,
|
||||
palette.muted,
|
||||
);
|
||||
});
|
||||
egui::SidePanel::right("inspector")
|
||||
.exact_width(392.0)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
- Align status-bar connection, mapping, send/load and scope controls in one vertically centered row with consistent spacing and button heights; let labels determine positions instead of fixed offsets.
|
||||
|
||||
- Rename Apply changes and Configure Midra export to “Midra mapping & transfer…” so the action clearly opens layer mapping and send/load settings; actual sending remains a separate button.
|
||||
|
||||
- Keep multiple reference images in a purple section of the layer list, with add, eye, remove, settings and Show only actions; references remain fixed and excluded from layer/device operations. Add removal to Import and viewport/reference context menus. Queue multi-file imports in order, composite visible guides in viewport/artwork exports, and save all images in project v10 with tested v1–v9/recovery migration. Corrupt additions or project images preserve existing work.
|
||||
|
|
|
|||
Loading…
Reference in New Issue