From 0cfadeb6de542548c45ef485a4452e820cefb401 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 17 Nov 2016 22:23:30 +0100 Subject: Contact List: tweak the section header Replace the old-fashioned gradient with a ToolBar. It stands out more than well enough, and is fully style-agnostic. Also, give descriptive IDs for better designer integration/preview. Change-Id: Ib2d4404e3c0fa769ac661645046a25e578f62d37 Reviewed-by: Mitch Curtis --- .../contactlist/SectionDelegate.ui.qml | 25 ++++++---------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'examples/quickcontrols2/contactlist/SectionDelegate.ui.qml') diff --git a/examples/quickcontrols2/contactlist/SectionDelegate.ui.qml b/examples/quickcontrols2/contactlist/SectionDelegate.ui.qml index 3b9f7dc5..fa64ffbf 100644 --- a/examples/quickcontrols2/contactlist/SectionDelegate.ui.qml +++ b/examples/quickcontrols2/contactlist/SectionDelegate.ui.qml @@ -51,27 +51,14 @@ import QtQuick 2.7 import QtQuick.Controls 2.1 -Rectangle { - height: 20 - width: 120 - gradient: Gradient { - GradientStop { - position: 0 - color: "#dddddd" - } - - GradientStop { - position: 1 - color: "blue" - } - } +ToolBar { + id: background Label { - x: 12 - color: "white" + id: label text: section - style: Text.Raised - font.pixelSize: 18 - font.bold: true + anchors.fill: parent + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter } } -- cgit v1.2.3