diff options
Diffstat (limited to 'src/dialogs')
-rw-r--r-- | src/dialogs/qquickabstractdialog.cpp | 5 | ||||
-rw-r--r-- | src/dialogs/qquickabstractdialog_p.h | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/dialogs/qquickabstractdialog.cpp b/src/dialogs/qquickabstractdialog.cpp index ffc995c8..ba65bd8b 100644 --- a/src/dialogs/qquickabstractdialog.cpp +++ b/src/dialogs/qquickabstractdialog.cpp @@ -107,6 +107,8 @@ void QQuickAbstractDialog::setVisible(bool v) // Pure QML implementation: wrap the contentItem in a window, or fake it if (!m_dialogWindow && m_contentItem) { + if (v) + emit __maximumDimensionChanged(); if (m_hasNativeWindows) m_dialogWindow = m_contentItem->window(); // An Item-based dialog implementation doesn't come with a window, so @@ -220,7 +222,7 @@ void QQuickAbstractDialog::decorationLoaded() m_windowDecoration->setProperty("content", contentVariant); connect(m_windowDecoration, SIGNAL(dismissed()), this, SLOT(reject())); ok = true; - qCDebug(lcWindow) << "using synthetic window decoration" << m_windowDecoration; + qCDebug(lcWindow) << "using synthetic window decoration" << m_windowDecoration << "from" << m_decorationComponent->url(); } else { qWarning() << m_decorationComponent->url() << "cannot be used as a window decoration because it's not an Item"; @@ -360,6 +362,7 @@ int QQuickAbstractDialog::height() const int QQuickAbstractDialog::__maximumDimension() const { QScreen *screen = QGuiApplication::primaryScreen(); + qCDebug(lcWindow) << "__maximumDimension checking screen" << screen << "geometry" << screen->availableVirtualGeometry(); return (screen ? qMin(screen->availableVirtualGeometry().width(), screen->availableVirtualGeometry().height()) : 480) * 9 / 10; diff --git a/src/dialogs/qquickabstractdialog_p.h b/src/dialogs/qquickabstractdialog_p.h index 3a9a0cd5..0fe7fa67 100644 --- a/src/dialogs/qquickabstractdialog_p.h +++ b/src/dialogs/qquickabstractdialog_p.h @@ -69,7 +69,7 @@ class QQuickAbstractDialog : public QObject Q_PROPERTY(int y READ y WRITE setY NOTIFY geometryChanged) Q_PROPERTY(int width READ width WRITE setWidth NOTIFY geometryChanged) Q_PROPERTY(int height READ height WRITE setHeight NOTIFY geometryChanged) - Q_PROPERTY(int __maximumDimension READ __maximumDimension CONSTANT) + Q_PROPERTY(int __maximumDimension READ __maximumDimension NOTIFY __maximumDimensionChanged) public: QQuickAbstractDialog(QObject *parent = 0); @@ -131,6 +131,7 @@ Q_SIGNALS: void titleChanged(); void accepted(); void rejected(); + void __maximumDimensionChanged(); protected Q_SLOTS: void decorationLoaded(); |