Merge pull request #865 from aws-lumberyard-dev/LYN-2139

LYN-2139 UX: Goto Position modal is unnecessarily massive
main
sphrose 5 years ago committed by GitHub
commit d15cbdbbc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -34,6 +34,7 @@ CGotoPositionDlg::CGotoPositionDlg(QWidget* pParent /*=NULL*/)
{ {
m_ui->setupUi(this); m_ui->setupUi(this);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setFixedSize(size());
OnInitDialog(); OnInitDialog();
auto doubleValueChanged = static_cast<void(QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged); auto doubleValueChanged = static_cast<void(QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged);
@ -98,6 +99,9 @@ void CGotoPositionDlg::OnInitDialog()
m_ui->m_dymSegX->setVisible(false); m_ui->m_dymSegX->setVisible(false);
m_ui->m_dymSegY->setVisible(false); m_ui->m_dymSegY->setVisible(false);
// Ensure the goto button is highlighted correctly.
m_ui->pushButton->setDefault(true);
OnUpdateNumbers(); OnUpdateNumbers();
} }

@ -6,189 +6,210 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>358</width> <width>290</width>
<height>198</height> <height>180</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Go to Position</string> <string>Go to Position</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1,0,0,1,0,0,1"> <layout class="QVBoxLayout" name="verticalLayout">
<item row="6" column="0" colspan="2"> <item>
<widget class="QPushButton" name="pushButton"> <layout class="QGridLayout" name="gridLayout" columnstretch="0,1,0,0,1,0,0,1">
<property name="text"> <item row="5" column="6" colspan="2">
<string>Go To</string> <spacer name="horizontalSpacer">
</property> <property name="orientation">
</widget> <enum>Qt::Horizontal</enum>
</item> </property>
<item row="6" column="3" colspan="2"> <property name="sizeHint" stdset="0">
<widget class="QPushButton" name="pushButton_2"> <size>
<property name="text"> <width>40</width>
<string>Cancel</string> <height>20</height>
</property> </size>
</widget> </property>
</item> </spacer>
<item row="5" column="6" colspan="2"> </item>
<spacer name="horizontalSpacer"> <item row="3" column="2">
<property name="orientation"> <spacer name="horizontalSpacer_2">
<enum>Qt::Horizontal</enum> <property name="orientation">
</property> <enum>Qt::Horizontal</enum>
<property name="sizeHint" stdset="0"> </property>
<size> <property name="sizeType">
<width>40</width> <enum>QSizePolicy::Fixed</enum>
<height>20</height> </property>
</size> <property name="sizeHint" stdset="0">
</property> <size>
</spacer> <width>22</width>
</item> <height>20</height>
<item row="3" column="2"> </size>
<spacer name="horizontalSpacer_2"> </property>
<property name="orientation"> </spacer>
<enum>Qt::Horizontal</enum> </item>
</property> <item row="5" column="1">
<property name="sizeType"> <widget class="QDoubleSpinBox" name="m_dymZ"/>
<enum>QSizePolicy::Fixed</enum> </item>
</property> <item row="4" column="1">
<property name="sizeHint" stdset="0"> <widget class="QDoubleSpinBox" name="m_dymY"/>
<size> </item>
<width>22</width> <item row="3" column="1">
<height>20</height> <widget class="QDoubleSpinBox" name="m_dymX"/>
</size> </item>
</property> <item row="4" column="4">
</spacer> <widget class="QDoubleSpinBox" name="m_dymAngleY"/>
</item> </item>
<item row="5" column="1"> <item row="3" column="4">
<widget class="QDoubleSpinBox" name="m_dymZ"/> <widget class="QDoubleSpinBox" name="m_dymAngleX"/>
</item> </item>
<item row="4" column="1"> <item row="5" column="0">
<widget class="QDoubleSpinBox" name="m_dymY"/> <widget class="QLabel" name="label_8">
</item> <property name="text">
<item row="3" column="1"> <string>Z:</string>
<widget class="QDoubleSpinBox" name="m_dymX"/> </property>
</item> </widget>
<item row="4" column="4"> </item>
<widget class="QDoubleSpinBox" name="m_dymAngleY"/> <item row="4" column="3">
</item> <widget class="QLabel" name="label_7">
<item row="3" column="4"> <property name="text">
<widget class="QDoubleSpinBox" name="m_dymAngleX"/> <string>Y:</string>
</item> </property>
<item row="5" column="0"> </widget>
<widget class="QLabel" name="label_8"> </item>
<property name="text"> <item row="0" column="0" colspan="8">
<string>Z:</string> <widget class="QLabel" name="label">
</property> <property name="text">
</widget> <string>Enter position here:</string>
</item> </property>
<item row="4" column="3"> </widget>
<widget class="QLabel" name="label_7"> </item>
<property name="text"> <item row="3" column="0">
<string>Y:</string> <widget class="QLabel" name="label_4">
</property> <property name="text">
</widget> <string>X:</string>
</item> </property>
<item row="0" column="0" colspan="8"> </widget>
<widget class="QLabel" name="label"> </item>
<property name="text"> <item row="1" column="0" colspan="8">
<string>Enter position here:</string> <widget class="QLineEdit" name="m_posEdit">
</property> <property name="alignment">
</widget> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</item> </property>
<item row="3" column="0"> </widget>
<widget class="QLabel" name="label_4"> </item>
<property name="text"> <item row="2" column="0" colspan="2">
<string>X:</string> <widget class="QLabel" name="label_2">
</property> <property name="text">
</widget> <string>Position:</string>
</item> </property>
<item row="1" column="0" colspan="8"> </widget>
<widget class="QLineEdit" name="m_posEdit"> </item>
<property name="alignment"> <item row="3" column="3">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> <widget class="QLabel" name="label_5">
</property> <property name="text">
</widget> <string>X:</string>
</item> </property>
<item row="2" column="0" colspan="2"> </widget>
<widget class="QLabel" name="label_2"> </item>
<property name="text"> <item row="3" column="6">
<string>Position:</string> <widget class="QLabel" name="m_labelSegX">
</property> <property name="text">
</widget> <string>X:</string>
</item> </property>
<item row="3" column="3"> </widget>
<widget class="QLabel" name="label_5"> </item>
<property name="text"> <item row="5" column="4">
<string>X:</string> <widget class="QDoubleSpinBox" name="m_dymAngleZ"/>
</property> </item>
</widget> <item row="4" column="0">
</item> <widget class="QLabel" name="label_6">
<item row="3" column="6"> <property name="text">
<widget class="QLabel" name="m_labelSegX"> <string>Y:</string>
<property name="text"> </property>
<string>X:</string> </widget>
</property> </item>
</widget> <item row="4" column="6">
</item> <widget class="QLabel" name="m_labelSegY">
<item row="5" column="4"> <property name="text">
<widget class="QDoubleSpinBox" name="m_dymAngleZ"/> <string>Y:</string>
</item> </property>
<item row="4" column="0"> </widget>
<widget class="QLabel" name="label_6"> </item>
<property name="text"> <item row="5" column="3">
<string>Y:</string> <widget class="QLabel" name="label_9">
</property> <property name="text">
</widget> <string>Z:</string>
</item> </property>
<item row="4" column="6"> </widget>
<widget class="QLabel" name="m_labelSegY"> </item>
<property name="text"> <item row="3" column="5">
<string>Y:</string> <spacer name="horizontalSpacer_3">
</property> <property name="orientation">
</widget> <enum>Qt::Horizontal</enum>
</item> </property>
<item row="5" column="3"> <property name="sizeType">
<widget class="QLabel" name="label_9"> <enum>QSizePolicy::Fixed</enum>
<property name="text"> </property>
<string>Z:</string> <property name="sizeHint" stdset="0">
</property> <size>
</widget> <width>22</width>
</item> <height>20</height>
<item row="3" column="5"> </size>
<spacer name="horizontalSpacer_3"> </property>
<property name="orientation"> </spacer>
<enum>Qt::Horizontal</enum> </item>
</property> <item row="2" column="3" colspan="2">
<property name="sizeType"> <widget class="QLabel" name="label_3">
<enum>QSizePolicy::Fixed</enum> <property name="text">
</property> <string>Angles:</string>
<property name="sizeHint" stdset="0"> </property>
<size> </widget>
<width>22</width> </item>
<height>20</height> <item row="2" column="6" colspan="2">
</size> <widget class="QLabel" name="m_labelSeg">
</property> <property name="text">
</spacer> <string>Segments:</string>
</item> </property>
<item row="2" column="3" colspan="2"> </widget>
<widget class="QLabel" name="label_3"> </item>
<property name="text"> <item row="3" column="7">
<string>Angles:</string> <widget class="QSpinBox" name="m_dymSegX"/>
</property> </item>
</widget> <item row="4" column="7">
</item> <widget class="QSpinBox" name="m_dymSegY"/>
<item row="2" column="6" colspan="2"> </item>
<widget class="QLabel" name="m_labelSeg"> </layout>
<property name="text"> </item>
<string>Segments:</string> <item>
</property> <layout class="QHBoxLayout" name="buttonLayout">
</widget> <item>
</item> <spacer name="horizontalSpacer_1">
<item row="3" column="7"> <property name="orientation">
<widget class="QSpinBox" name="m_dymSegX"/> <enum>Qt::Horizontal</enum>
</item> </property>
<item row="4" column="7"> <property name="sizeHint" stdset="0">
<widget class="QSpinBox" name="m_dymSegY"/> <size>
</item> <width>0</width>
</layout> <height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Go To</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>m_posEdit</tabstop> <tabstop>m_posEdit</tabstop>

Loading…
Cancel
Save