summaryrefslogtreecommitdiff
path: root/src/dialogs/DefaultFileDialog.qml
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-09-03 16:55:43 +0200
committerShawn Rutledge <shawn.rutledge@digia.com>2014-09-04 13:34:03 +0200
commitc7efd1a2d4ef44db69db9f44f0247b91f98919b6 (patch)
tree0002cf42d8b8b8d7ab1fb95ef04476e3b20249fa /src/dialogs/DefaultFileDialog.qml
parentf4605583e857c11247f557d665e267a1711d561b (diff)
downloadqtquickcontrols-c7efd1a2d4ef44db69db9f44f0247b91f98919b6.tar.gz
FileDialog: use icon font instead of PNG images
The purpose is to make all icons scaleable so that there is no need for multiple resolutions. Change-Id: I535c569a10e0f97a81763fa334ed103ba7745907 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/dialogs/DefaultFileDialog.qml')
-rw-r--r--src/dialogs/DefaultFileDialog.qml26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/dialogs/DefaultFileDialog.qml b/src/dialogs/DefaultFileDialog.qml
index 7a91353f..d1af7b18 100644
--- a/src/dialogs/DefaultFileDialog.qml
+++ b/src/dialogs/DefaultFileDialog.qml
@@ -113,9 +113,8 @@ AbstractFileDialog {
}
property Action dirUpAction: Action {
- text: "&Up"
+ text: "\ue810"
shortcut: "Ctrl+U"
- iconSource: "images/up.png"
onTriggered: dirUp()
tooltip: "Go up to the folder containing this one"
}
@@ -278,10 +277,15 @@ AbstractFileDialog {
Row {
id: favoritesButtons
- height: plusButton.height
+ height: plusButton.height + 1
+ anchors.right: parent.right
+ anchors.rightMargin: 6
+ layoutDirection: Qt.RightToLeft
Button {
id: plusButton
- text: "+"
+ style: IconButtonStyle { }
+ text: "\ue83e"
+ tooltip: "Add the current directory as a favorite"
width: height
onClicked: {
root.favoriteFolders.push(root.folder)
@@ -321,27 +325,26 @@ AbstractFileDialog {
}
}
+
TableViewColumn {
id: fileNameColumn
role: "fileName"
title: "Filename"
delegate: Item {
implicitWidth: pathText.implicitWidth + pathText.anchors.leftMargin + pathText.anchors.rightMargin
- Image {
+ IconGlyph {
id: fileIcon
- width: height
x: 4
height: parent.height - 2
- source: "images/folder.png"
+ unicode: view.model.isFolder(styleData.row) ? "\ue804" : "\ue802"
}
Text {
id: pathText
text: styleData.value
- onTextChanged: fileIcon.visible = view.model.isFolder(styleData.row)
anchors {
left: parent.left
right: parent.right
- leftMargin: fileIcon.width + 8
+ leftMargin: fileIcon.width + 6
rightMargin: 4
verticalCenter: parent.verticalCenter
}
@@ -387,10 +390,11 @@ AbstractFileDialog {
ToolBar {
id: titleBar
RowLayout {
- width: parent.width
+ anchors.fill: parent
ToolButton {
- iconSource: "images/up.png"
action: dirUpAction
+ style: IconButtonStyle { }
+ Layout.maximumWidth: height * 1.5
}
TextField {
id: currentPathField