diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-10-31 16:08:59 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-10-31 16:08:59 +0100 |
commit | f7fd7460231ea9ad80fc85b4af793ad7ace56930 (patch) | |
tree | 2155c9399945b4ebe0b9af84da75b478afb30683 /src/imports/controls/universal | |
parent | f4b2f9eeac7f9175a5834f405ad88fb6d28864e1 (diff) | |
parent | 10972ca272ae59fbe0f18eef6d9237fbd4aaca86 (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
src/quicktemplates2/qquickpopup.cpp
src/quicktemplates2/qquickpopup_p_p.h
Change-Id: I33241dfd15a320e6ae2f0c056252b0ec6be7c6f6
Diffstat (limited to 'src/imports/controls/universal')
-rw-r--r-- | src/imports/controls/universal/Dialog.qml | 26 | ||||
-rw-r--r-- | src/imports/controls/universal/Page.qml | 4 | ||||
-rw-r--r-- | src/imports/controls/universal/qquickuniversaltheme.cpp | 4 |
3 files changed, 26 insertions, 8 deletions
diff --git a/src/imports/controls/universal/Dialog.qml b/src/imports/controls/universal/Dialog.qml index 0f00b760..f805581c 100644 --- a/src/imports/controls/universal/Dialog.qml +++ b/src/imports/controls/universal/Dialog.qml @@ -47,8 +47,9 @@ T.Dialog { footer && footer.visible ? footer.implicitWidth : 0, contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0) implicitHeight: Math.max(background ? background.implicitHeight : 0, - (header && header.visible ? header.implicitHeight : 0) + (footer && footer.visible ? footer.implicitHeight : 0)) - + (contentHeight > 0 ? contentHeight + topPadding + bottomPadding : 0) + (header && header.visible ? header.implicitHeight + spacing : 0) + + (footer && footer.visible ? footer.implicitHeight + spacing : 0) + + (contentHeight > 0 ? contentHeight + topPadding + bottomPadding : 0)) contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) @@ -63,7 +64,24 @@ T.Dialog { border.width: 1 // FlyoutBorderThemeThickness } - buttonBox: DialogButtonBox { - position: DialogButtonBox.Footer + header: Label { + text: control.title + visible: control.title + elide: Label.ElideRight + topPadding: 18 + leftPadding: 24 + rightPadding: 24 + // TODO: QPlatformTheme::TitleBarFont + font.pixelSize: 20 + background: Rectangle { + x: 1; y: 1 // // FlyoutBorderThemeThickness + color: control.Universal.chromeMediumLowColor + width: parent.width - 2 + height: parent.height - 1 + } + } + + footer: DialogButtonBox { + visible: count > 0 } } diff --git a/src/imports/controls/universal/Page.qml b/src/imports/controls/universal/Page.qml index 9bd85751..e8c7bd4a 100644 --- a/src/imports/controls/universal/Page.qml +++ b/src/imports/controls/universal/Page.qml @@ -47,8 +47,8 @@ T.Page { footer && footer.visible ? footer.implicitWidth : 0) + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding - + (header && header.visible ? header.implicitHeight : 0) - + (footer && footer.visible ? footer.implicitHeight : 0)) + + (header && header.visible ? header.implicitHeight + spacing : 0) + + (footer && footer.visible ? footer.implicitHeight + spacing : 0)) contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) diff --git a/src/imports/controls/universal/qquickuniversaltheme.cpp b/src/imports/controls/universal/qquickuniversaltheme.cpp index 51642c4a..dc516b45 100644 --- a/src/imports/controls/universal/qquickuniversaltheme.cpp +++ b/src/imports/controls/universal/qquickuniversaltheme.cpp @@ -44,8 +44,8 @@ QT_BEGIN_NAMESPACE QQuickUniversalTheme::QQuickUniversalTheme(QPlatformTheme *theme) : QQuickProxyTheme(theme) { - const QFont font(QStringLiteral("Segoe UI")); - if (QFontInfo(font).family() == QStringLiteral("Segoe UI")) { + const QFont font(QLatin1String("Segoe UI")); + if (QFontInfo(font).family() == QLatin1String("Segoe UI")) { const QString family = font.family(); systemFont.setFamily(family); groupBoxTitleFont.setFamily(family); |