mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-29 21:26:48 -06:00
Merge PR #1252: Dialogs move by their title bar instead of staying pinned to the centre (fixes #1250)
docs/ui-parity.md: status line combined (newest date, both change notes)
This commit is contained in:
@@ -1044,7 +1044,9 @@ pub fn show(app: &mut SheetApp, ctx: &egui::Context) {
|
||||
.collapsible(false)
|
||||
.resizable(false)
|
||||
.default_width(width)
|
||||
.anchor(egui::Align2::CENTER_CENTER, vec2(0.0, -40.0))
|
||||
// A default position, not an anchor: egui anchors can't be dragged, and dialogs move by their title bar.
|
||||
.pivot(egui::Align2::CENTER_CENTER)
|
||||
.default_pos(ctx.content_rect().center() + vec2(0.0, -40.0))
|
||||
.open(&mut win_open);
|
||||
let window = if d.name == "insertPicture" { window.default_height(240.0) } else { window };
|
||||
window.show(ctx, |ui| {
|
||||
|
||||
Reference in New Issue
Block a user