forked from qt-creator/qt-creator
QmlDesigner: Set a sensible initial size for various views
Fixes: QDS-10493 Change-Id: Idfb49daa60e73a5ee12da0d418d5122b1b5f6e62 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -10,6 +10,9 @@ import StudioTheme 1.0 as StudioTheme
|
|||||||
PropertyEditorPane {
|
PropertyEditorPane {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
width: 420
|
||||||
|
height: 420
|
||||||
|
|
||||||
signal toolBarAction(int action)
|
signal toolBarAction(int action)
|
||||||
signal previewEnvChanged(string env)
|
signal previewEnvChanged(string env)
|
||||||
signal previewModelChanged(string model)
|
signal previewModelChanged(string model)
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ import HelperWidgets 2.0
|
|||||||
PropertyEditorPane {
|
PropertyEditorPane {
|
||||||
id: itemPane
|
id: itemPane
|
||||||
|
|
||||||
|
width: 420
|
||||||
|
height: 420
|
||||||
|
|
||||||
signal toolBarAction(int action)
|
signal toolBarAction(int action)
|
||||||
signal previewEnvChanged(string env)
|
signal previewEnvChanged(string env)
|
||||||
signal previewModelChanged(string model)
|
signal previewModelChanged(string model)
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ import StudioTheme 1.0 as StudioTheme
|
|||||||
PropertyEditorPane {
|
PropertyEditorPane {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
width: 420
|
||||||
|
height: 420
|
||||||
|
|
||||||
signal toolBarAction(int action)
|
signal toolBarAction(int action)
|
||||||
|
|
||||||
// Called from C++, dummy method to avoid warnings
|
// Called from C++, dummy method to avoid warnings
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ import HelperWidgets 2.0
|
|||||||
PropertyEditorPane {
|
PropertyEditorPane {
|
||||||
id: itemPane
|
id: itemPane
|
||||||
|
|
||||||
|
width: 420
|
||||||
|
height: 420
|
||||||
|
|
||||||
signal toolBarAction(int action)
|
signal toolBarAction(int action)
|
||||||
|
|
||||||
// invoked from C++ to refresh material preview image
|
// invoked from C++ to refresh material preview image
|
||||||
|
|||||||
@@ -596,6 +596,11 @@ void ContentLibraryWidget::markTextureUpdated(const QString &textureKey)
|
|||||||
m_environmentsModel->markTextureHasNoUpdates(subcategory, textureKey);
|
m_environmentsModel->markTextureHasNoUpdates(subcategory, textureKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QSize ContentLibraryWidget::sizeHint() const
|
||||||
|
{
|
||||||
|
return {420, 420};
|
||||||
|
}
|
||||||
|
|
||||||
QList<QToolButton *> ContentLibraryWidget::createToolBarWidgets()
|
QList<QToolButton *> ContentLibraryWidget::createToolBarWidgets()
|
||||||
{
|
{
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ public:
|
|||||||
Q_INVOKABLE void updateSceneEnvState();
|
Q_INVOKABLE void updateSceneEnvState();
|
||||||
Q_INVOKABLE void markTextureUpdated(const QString &textureKey);
|
Q_INVOKABLE void markTextureUpdated(const QString &textureKey);
|
||||||
|
|
||||||
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void bundleEffectDragStarted(QmlDesigner::ContentLibraryEffect *bundleEff);
|
void bundleEffectDragStarted(QmlDesigner::ContentLibraryEffect *bundleEff);
|
||||||
void bundleMaterialDragStarted(QmlDesigner::ContentLibraryMaterial *bundleMat);
|
void bundleMaterialDragStarted(QmlDesigner::ContentLibraryMaterial *bundleMat);
|
||||||
|
|||||||
@@ -109,6 +109,11 @@ void EffectMakerWidget::focusSection(int section)
|
|||||||
Q_UNUSED(section)
|
Q_UNUSED(section)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QSize EffectMakerWidget::sizeHint() const
|
||||||
|
{
|
||||||
|
return {420, 420};
|
||||||
|
}
|
||||||
|
|
||||||
QString EffectMakerWidget::qmlSourcesPath()
|
QString EffectMakerWidget::qmlSourcesPath()
|
||||||
{
|
{
|
||||||
#ifdef SHARE_QML_PATH
|
#ifdef SHARE_QML_PATH
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ public:
|
|||||||
Q_INVOKABLE void addEffectNode(const QString &nodeQenPath);
|
Q_INVOKABLE void addEffectNode(const QString &nodeQenPath);
|
||||||
Q_INVOKABLE void focusSection(int section);
|
Q_INVOKABLE void focusSection(int section);
|
||||||
|
|
||||||
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||||
|
|
||||||
|
|||||||
@@ -405,6 +405,11 @@ void MaterialBrowserWidget::clearPreviewCache()
|
|||||||
m_previewImageProvider->clearPixmapCache();
|
m_previewImageProvider->clearPixmapCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QSize MaterialBrowserWidget::sizeHint() const
|
||||||
|
{
|
||||||
|
return {420, 420};
|
||||||
|
}
|
||||||
|
|
||||||
QPointer<MaterialBrowserModel> MaterialBrowserWidget::materialBrowserModel() const
|
QPointer<MaterialBrowserModel> MaterialBrowserWidget::materialBrowserModel() const
|
||||||
{
|
{
|
||||||
return m_materialBrowserModel;
|
return m_materialBrowserModel;
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ public:
|
|||||||
|
|
||||||
void clearPreviewCache();
|
void clearPreviewCache();
|
||||||
|
|
||||||
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void materialSectionFocusedChanged();
|
void materialSectionFocusedChanged();
|
||||||
void isDraggingChanged();
|
void isDraggingChanged();
|
||||||
|
|||||||
Reference in New Issue
Block a user