From c42c0171092b2ddc40153325dbca0a1f6ff05508 Mon Sep 17 00:00:00 2001 From: Tomasz Olszak Date: Tue, 7 Oct 2014 01:05:06 +0200 Subject: [HOTFIX] Added ApplicationWindowStyle based on Base style. Bug-Tizen: TC-1008 Change-Id: I19b5170241bbd952bdccf14bca990e667cf92ebd Signed-off-by: Tomasz Olszak --- src/styles/ApplicationWindowStyle.qml | 59 +++++++++++++++++++++++++++++++++++ src/styles/styles.pro | 3 +- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 src/styles/ApplicationWindowStyle.qml diff --git a/src/styles/ApplicationWindowStyle.qml b/src/styles/ApplicationWindowStyle.qml new file mode 100644 index 0000000..453a148 --- /dev/null +++ b/src/styles/ApplicationWindowStyle.qml @@ -0,0 +1,59 @@ +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\ -- cgit v1.2.3