From 3788aa4eec9f3820eca2487cad8b11ff91fb45fa Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Thu, 20 May 2021 17:48:18 +0100 Subject: [PATCH 1/4] LYN-2139 UX: Goto Position modal is unnecessarily massive --- Code/Sandbox/Editor/GotoPositionDlg.cpp | 1 + Code/Sandbox/Editor/GotoPositionDlg.ui | 373 +++++++++++++----------- 2 files changed, 198 insertions(+), 176 deletions(-) diff --git a/Code/Sandbox/Editor/GotoPositionDlg.cpp b/Code/Sandbox/Editor/GotoPositionDlg.cpp index a09f594b7b..6e2deaf618 100644 --- a/Code/Sandbox/Editor/GotoPositionDlg.cpp +++ b/Code/Sandbox/Editor/GotoPositionDlg.cpp @@ -34,6 +34,7 @@ CGotoPositionDlg::CGotoPositionDlg(QWidget* pParent /*=NULL*/) { m_ui->setupUi(this); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); + setFixedSize(size()); OnInitDialog(); auto doubleValueChanged = static_cast(&QDoubleSpinBox::valueChanged); diff --git a/Code/Sandbox/Editor/GotoPositionDlg.ui b/Code/Sandbox/Editor/GotoPositionDlg.ui index 4c93c8f037..5703850be0 100644 --- a/Code/Sandbox/Editor/GotoPositionDlg.ui +++ b/Code/Sandbox/Editor/GotoPositionDlg.ui @@ -13,182 +13,203 @@ Go to Position - - - - - Go To - - - - - - - Cancel - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 22 - 20 - - - - - - - - - - - - - - - - - - - - - - - Z: - - - - - - - Y: - - - - - - - Enter position here: - - - - - - - X: - - - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - Position: - - - - - - - X: - - - - - - - X: - - - - - - - - - - Y: - - - - - - - Y: - - - - - - - Z: - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 22 - 20 - - - - - - - - Angles: - - - - - - - Segments: - - - - - - - - - - + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 22 + 20 + + + + + + + + + + + + + + + + + + + + + + + Z: + + + + + + + Y: + + + + + + + Enter position here: + + + + + + + X: + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Position: + + + + + + + X: + + + + + + + X: + + + + + + + + + + Y: + + + + + + + Y: + + + + + + + Z: + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 22 + 20 + + + + + + + + Angles: + + + + + + + Segments: + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + Go To + + + + + + + Cancel + + + + + + m_posEdit From bbafd8843d62426ecbfa029ddf5c455c23a3b3ca Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Fri, 21 May 2021 09:56:25 +0100 Subject: [PATCH 2/4] Adjusted dialog size. --- Code/Sandbox/Editor/GotoPositionDlg.ui | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/Sandbox/Editor/GotoPositionDlg.ui b/Code/Sandbox/Editor/GotoPositionDlg.ui index 5703850be0..9791b5bff1 100644 --- a/Code/Sandbox/Editor/GotoPositionDlg.ui +++ b/Code/Sandbox/Editor/GotoPositionDlg.ui @@ -6,8 +6,8 @@ 0 0 - 358 - 198 + 290 + 180 From 032201a66b5c25eb323f0a11e2d5d86e67906871 Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Fri, 21 May 2021 10:31:47 +0100 Subject: [PATCH 3/4] Make goto button primary. --- Code/Sandbox/Editor/GotoPositionDlg.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Code/Sandbox/Editor/GotoPositionDlg.cpp b/Code/Sandbox/Editor/GotoPositionDlg.cpp index 6e2deaf618..85ed1b5f03 100644 --- a/Code/Sandbox/Editor/GotoPositionDlg.cpp +++ b/Code/Sandbox/Editor/GotoPositionDlg.cpp @@ -99,6 +99,8 @@ void CGotoPositionDlg::OnInitDialog() m_ui->m_dymSegX->setVisible(false); m_ui->m_dymSegY->setVisible(false); + m_ui->pushButton->setDefault(true); + OnUpdateNumbers(); } From 5be021a6ded33343271b7b0bf0b53a730b9c4d84 Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Fri, 21 May 2021 14:42:46 +0100 Subject: [PATCH 4/4] Added comment. --- Code/Sandbox/Editor/GotoPositionDlg.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Code/Sandbox/Editor/GotoPositionDlg.cpp b/Code/Sandbox/Editor/GotoPositionDlg.cpp index 85ed1b5f03..f52a45cad4 100644 --- a/Code/Sandbox/Editor/GotoPositionDlg.cpp +++ b/Code/Sandbox/Editor/GotoPositionDlg.cpp @@ -99,6 +99,7 @@ void CGotoPositionDlg::OnInitDialog() m_ui->m_dymSegX->setVisible(false); m_ui->m_dymSegY->setVisible(false); + // Ensure the goto button is highlighted correctly. m_ui->pushButton->setDefault(true); OnUpdateNumbers();