diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-10-18 11:46:03 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-10-19 10:19:16 +0000 |
commit | 576ef3232e9ada7ba4c397cff3fb4056af1d77e4 (patch) | |
tree | 8067bf8f3321ebbebda13aece1465caa9adb7de5 /src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp | |
parent | 3cbc990590ac915d73454addc1be06dbefe7e109 (diff) |
Fix datainput chooser popup alignment
Introduced new options for CDialogs::showWidgetBrowser alignment:
Combobox, ToolButton, or Center. Combobox is the default and positions
the popup as it has before, which is suitable for comboboxes.
ToolButton alignment positions the corner of the popup over the
toolbutton and prefers to open the popup above rather than below.
Center alignment simply centers the popup on given point.
Task-number: QT3DS-2504
Change-Id: Ibca6895010baec19508259eb6b3976b6082740e9
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp')
-rw-r--r-- | src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp index abde42ea..43242083 100644 --- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp +++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp @@ -578,6 +578,7 @@ QObject *InspectorControlView::showMaterialReference(int handle, int instance, c const int popupHeight = qMin(numMats, 10) * CStudioPreferences::controlBaseHeight(); CDialogs::showWidgetBrowser(this, m_matRefListWidget, point, + CDialogs::WidgetBrowserAlign::ComboBox, QSize(CStudioPreferences::valueWidth(), popupHeight)); connect(m_matRefListWidget, &QListWidget::itemClicked, this, [=](QListWidgetItem *item) { @@ -626,7 +627,8 @@ void InspectorControlView::showDataInputChooser(int handle, int instance, const setData(dataInputList, m_inspectorControlModel->currentControllerValue(instance, handle), handle, instance); - CDialogs::showWidgetBrowser(this, m_dataInputChooserView, point); + CDialogs::showWidgetBrowser(this, m_dataInputChooserView, point, + CDialogs::WidgetBrowserAlign::ToolButton); } QColor InspectorControlView::showColorDialog(const QColor &color) |