summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslaw Staniek <staniek@kde.org>2013-06-19 14:18:01 +0200
committerTomasz Olszak <olszak.tomasz@gmail.com>2013-06-25 19:16:46 +0200
commite089a8df8a1b6cba515f5dacf73b30ce510b41ae (patch)
tree94e473aa3e3e1670f574d0d777848f46d0e37a1b
parent04ee3416ee056b665358f83b9a97a942b4d3944b (diff)
downloadqtquickcontrols-tizen-e089a8df8a1b6cba515f5dacf73b30ce510b41ae.tar.gz
qtquickcontrols-tizen-e089a8df8a1b6cba515f5dacf73b30ce510b41ae.tar.bz2
qtquickcontrols-tizen-e089a8df8a1b6cba515f5dacf73b30ce510b41ae.zip
ViewStyle added
Change-Id: Ib8e02efb8cfb73cc3a6eb763a3ad857aee79daf7 Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
-rw-r--r--src/controls/View.qml (renamed from examples/twitter/content/View.qml)0
-rw-r--r--src/styles/ViewStyle.qml65
2 files changed, 65 insertions, 0 deletions
diff --git a/examples/twitter/content/View.qml b/src/controls/View.qml
index b9f80e5..b9f80e5 100644
--- a/examples/twitter/content/View.qml
+++ b/src/controls/View.qml
diff --git a/src/styles/ViewStyle.qml b/src/styles/ViewStyle.qml
new file mode 100644
index 0000000..dda73ff
--- /dev/null
+++ b/src/styles/ViewStyle.qml
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2013 Jarosław Staniek <staniek@kde.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+import QtQuick 2.1
+import QtQuick.Controls.Tizen 1.0
+import QtQuick.Controls.Private 1.0
+import QtQuick.Controls.Tizen 1.0
+import "DefaultSettings.js" as Theme
+//import "utils.js" as Utils
+
+Style {
+ id: style
+ property View control: __control
+ //readonly property alias titleBar: __titleBar
+
+ property Component view: //Item {
+ Rectangle {
+ width: 720 // TODO Utils.appWidth
+ //width: control.width
+ Binding { target: control; property: "implicitWidth"; value: width }
+ height: 1280 // TODO Utils.appHeight
+ //height: header.height + header2.height + 30 + 30
+ Binding { target: control; property: "implicitHeight"; value: height }
+ property Component contents: control.view
+ Binding { target: control; property: "contents"; value: contents }
+
+ //anchors.centerIn: parent
+ //scale: Math.min(parent.width / width, parent.height / height)
+ color: "#f8f6ef"
+
+ TitleBar {
+ id: __titleBar
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ }
+ Binding { target: control; property: "titleBar"; value: __titleBar }
+
+/* Loader {
+ id: contentsLoader
+ sourceComponent: contents
+ anchors.top: titleBar.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ }*/
+ }
+ // }
+}