diff options
author | Tomasz Olszak <olszak.tomasz@gmail.com> | 2014-10-07 01:05:06 +0200 |
---|---|---|
committer | Tomasz Olszak <olszak.tomasz@gmail.com> | 2014-10-10 14:46:15 +0200 |
commit | 80cdcdbbbe8411636e5da58cc56af943146a9cdd (patch) | |
tree | 041db9feb5de89f92cbd246633781c75da09a534 | |
parent | 307f33c9998cd70e32a15a6892b967c22abb272b (diff) |
Added ApplicationWindowStyle based on Base style.wip/tizen
Change-Id: Ic01c8f4d36f4b9f7d022d74193b5d434db9da541
Reviewed-by: Philippe Coval <rzr@gna.org>
Reviewed-by: Leon Anavi <leon@anavi.org>
Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
-rw-r--r-- | src/styles/ApplicationWindowStyle.qml | 99 | ||||
-rw-r--r-- | src/styles/styles.pro | 3 |
2 files changed, 101 insertions, 1 deletions
diff --git a/src/styles/ApplicationWindowStyle.qml b/src/styles/ApplicationWindowStyle.qml new file mode 100644 index 0000000..475494f --- /dev/null +++ b/src/styles/ApplicationWindowStyle.qml @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.2 +import QtQuick.Controls 1.2 +import QtQuick.Controls.Private 1.0 + +QtObject { + readonly property ApplicationWindow control: __control + + property Component background: Rectangle { + visible: !styleData.hasColor + color: SystemPaletteSingleton.window(true) + } + + property Component panel: Item { + readonly property alias contentArea: contentArea + readonly property alias menuBarArea: menuBarArea + readonly property alias toolBarArea: toolBarArea + readonly property alias statusBarArea: statusBarArea + + Loader { + anchors.fill: parent + sourceComponent: background + } + + Item { + id: contentArea + anchors.top: toolBarArea.bottom + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: statusBarArea.top + } + + Item { + id: toolBarArea + anchors.top: parent.menuBarArea.bottom + anchors.left: parent.left + anchors.right: parent.right + implicitHeight: childrenRect.height + height: visibleChildren.length > 0 ? implicitHeight: 0 + } + + Item { + id: menuBarArea + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + implicitHeight: childrenRect.height + height: visibleChildren.length > 0 ? implicitHeight: 0 + } + + Item { + id: statusBarArea + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + implicitHeight: childrenRect.height + height: visibleChildren.length > 0 ? implicitHeight: 0 + } + } +} diff --git a/src/styles/styles.pro b/src/styles/styles.pro index 90ef5d7..8d3a20d 100644 --- a/src/styles/styles.pro +++ b/src/styles/styles.pro @@ -29,7 +29,8 @@ QML_FILES = \ PanelStyle.qml \ RadioButtonStyle.qml \ FocusFrameStyle.qml \ - ScrollViewStyle.qml + ScrollViewStyle.qml \ + ApplicationWindowStyle.qml QML_FILES += \ private/DateEditField.qml\ |