summaryrefslogtreecommitdiff
path: root/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml')
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml100
1 files changed, 46 insertions, 54 deletions
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml
index 7c8610361..c75b6f255 100644
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml
+++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
@@ -39,12 +39,13 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.folderlistmodel 2.0
+import QtQuick 2.1
+import Qt.labs.folderlistmodel 2.1
Rectangle {
id: fileBrowser
color: "transparent"
+ z: 4
property string folder
property bool shown: loader.sourceComponent
@@ -75,12 +76,12 @@ Rectangle {
Rectangle {
id: root
- color: "white"
+ color: "black"
property bool showFocusHighlight: false
property variant folders: folders1
property variant view: view1
property alias folder: folders1.folder
- property color textColor: "black"
+ property color textColor: "white"
FolderListModel {
id: folders1
@@ -112,7 +113,7 @@ Rectangle {
fileBrowser.selectFile(path)
}
width: root.width
- height: 52
+ height: itemHeight
color: "transparent"
Rectangle {
@@ -126,10 +127,12 @@ Rectangle {
}
Item {
- width: 48; height: 48
+ width: itemHeight; height: itemHeight
Image {
- source: "qrc:/images/folder.png"
- anchors.centerIn: parent
+ source: "qrc:/images/icon_Folder.png"
+ fillMode: Image.PreserveAspectFit
+ anchors.fill: parent
+ anchors.margins: scaledMargin
visible: folders.isFolder(index)
}
}
@@ -138,8 +141,8 @@ Rectangle {
id: nameText
anchors.fill: parent; verticalAlignment: Text.AlignVCenter
text: fileName
- anchors.leftMargin: 54
- font.pixelSize: 32
+ anchors.leftMargin: itemHeight + scaledMargin
+ font.pixelSize: fontSize
color: (wrapper.ListView.isCurrentItem && root.showFocusHighlight) ? palette.highlightedText : textColor
elide: Text.ElideRight
}
@@ -262,56 +265,45 @@ Rectangle {
Keys.onPressed: root.keyPressed(event.key)
}
- Rectangle {
+ Button {
id: cancelButton
- width: 100
- height: titleBar.height - 7
- color: "black"
- anchors { bottom: parent.bottom; horizontalCenter: parent.horizontalCenter }
-
- Text {
- anchors { fill: parent; margins: 4 }
- text: "Cancel"
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: 20
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: fileBrowser.selectFile("")
- }
+ width: itemWidth
+ height: itemHeight
+ color: "#353535"
+ anchors { bottom: parent.bottom; right: parent.right; margins: 5 * scaledMargin }
+ text: "Cancel"
+ horizontalAlign: Text.AlignHCenter
+ onClicked: fileBrowser.selectFile("")
}
Keys.onPressed: {
root.keyPressed(event.key);
- if (event.key == Qt.Key_Return || event.key == Qt.Key_Select || event.key == Qt.Key_Right) {
+ if (event.key === Qt.Key_Return || event.key === Qt.Key_Select || event.key === Qt.Key_Right) {
view.currentItem.launch();
event.accepted = true;
- } else if (event.key == Qt.Key_Left) {
+ } else if (event.key === Qt.Key_Left) {
up();
}
}
- BorderImage {
- source: "qrc:/images/titlebar.sci";
+ // titlebar
+ Rectangle {
+ color: "black"
width: parent.width;
- height: 52
- y: -7
+ height: itemHeight
id: titleBar
Rectangle {
id: upButton
- width: 48
- height: titleBar.height - 7
+ width: titleBar.height
+ height: titleBar.height
color: "transparent"
- Image { anchors.centerIn: parent; source: "qrc:/images/up.png" }
- MouseArea { id: upRegion; anchors.centerIn: parent
- width: 56
- height: 56
- onClicked: up()
- }
+ anchors.left: parent.left
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.margins: scaledMargin
+
+ Image { anchors.fill: parent; anchors.margins: scaledMargin; source: "qrc:/images/icon_BackArrow.png" }
+ MouseArea { id: upRegion; anchors.fill: parent; onClicked: up() }
states: [
State {
name: "pressed"
@@ -321,23 +313,23 @@ Rectangle {
]
}
- Rectangle {
- color: "gray"
- x: 48
- width: 1
- height: 44
- }
-
Text {
anchors.left: upButton.right; anchors.right: parent.right; height: parent.height
- anchors.leftMargin: 4; anchors.rightMargin: 4
+ anchors.leftMargin: 10; anchors.rightMargin: 4
text: folders.folder
color: "white"
- elide: Text.ElideLeft; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignVCenter
- font.pixelSize: 32
+ elide: Text.ElideLeft; horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter
+ font.pixelSize: fontSize
}
}
+ Rectangle {
+ color: "#353535"
+ width: parent.width
+ height: 1
+ anchors.top: titleBar.bottom
+ }
+
function down(path) {
if (folders == folders1) {
view = view2