aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/gallery
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-10-22 21:18:52 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-10-26 09:17:20 +0000
commit52e933ce2b10b0e1b48afa9ce048552830309da7 (patch)
tree4fa2775aeaac86bbf083b0d477b4919004a55fe4 /examples/quickcontrols2/gallery
parentfa71ef5a2ccfa4666db9338c4ba8f34d19f2faf1 (diff)
Add QQuickDialog::title
Dialog is incomplete without built-in support for title. All dialogs in the examples, screenshots, webinars, and blog posts have had a custom title. The Material and Universal designs both have specs for dialog titles. This commit adds support for dialog titles with appropriate looks (padding & font) out of the box. Task-number: QTBUG-56711 Change-Id: I248150313f1ce629a7105fdbe1c70c8fcd69e1cc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quickcontrols2/gallery')
-rw-r--r--examples/quickcontrols2/gallery/gallery.qml12
1 files changed, 2 insertions, 10 deletions
diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml
index 5fabe77f..c4b6c1a1 100644
--- a/examples/quickcontrols2/gallery/gallery.qml
+++ b/examples/quickcontrols2/gallery/gallery.qml
@@ -221,6 +221,7 @@ ApplicationWindow {
width: Math.round(Math.min(window.width, window.height) / 3 * 2)
modal: true
focus: true
+ title: "Settings"
standardButtons: Dialog.Ok | Dialog.Cancel
onAccepted: {
@@ -236,11 +237,6 @@ ApplicationWindow {
id: settingsColumn
spacing: 20
- Label {
- text: "Settings"
- font.bold: true
- }
-
RowLayout {
spacing: 10
@@ -277,6 +273,7 @@ ApplicationWindow {
id: aboutDialog
modal: true
focus: true
+ title: "About"
x: (window.width - width) / 2
y: window.height / 6
width: Math.min(window.width, window.height) / 3 * 2
@@ -287,11 +284,6 @@ ApplicationWindow {
spacing: 20
Label {
- text: "About"
- font.bold: true
- }
-
- Label {
width: aboutDialog.availableWidth
text: "The Qt Quick Controls 2 module delivers the next generation user interface controls based on Qt Quick."
wrapMode: Label.Wrap