mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 12:08:54 +02:00
Hide file filter if only 1 file type
This commit is contained in:
parent
663a2ddc64
commit
b8c0ec86af
3 changed files with 6 additions and 4 deletions
|
@ -296,8 +296,8 @@ ModalWindow {
|
||||||
label: "Path:"
|
label: "Path:"
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: root.selectDirectory ? parent.right : selectionType.left
|
right: selectionType.visible ? selectionType.left: parent.right
|
||||||
rightMargin: root.selectDirectory ? 0 : hifi.dimensions.contentSpacing.x
|
rightMargin: selectionType.visible ? hifi.dimensions.contentSpacing.x : 0
|
||||||
bottom: buttonRow.top
|
bottom: buttonRow.top
|
||||||
bottomMargin: hifi.dimensions.contentSpacing.y
|
bottomMargin: hifi.dimensions.contentSpacing.y
|
||||||
}
|
}
|
||||||
|
@ -314,7 +314,7 @@ ModalWindow {
|
||||||
left: buttonRow.left
|
left: buttonRow.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
visible: !selectDirectory
|
visible: !selectDirectory && filtersCount > 1
|
||||||
KeyNavigation.left: fileTableView
|
KeyNavigation.left: fileTableView
|
||||||
KeyNavigation.right: openButton
|
KeyNavigation.right: openButton
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ ComboBox {
|
||||||
id: root
|
id: root
|
||||||
property string filtersString: "All Files (*.*)";
|
property string filtersString: "All Files (*.*)";
|
||||||
property var currentFilter: [ "*.*" ];
|
property var currentFilter: [ "*.*" ];
|
||||||
|
property int filtersCount: filtersString.split(';;').length
|
||||||
|
|
||||||
// Per http://doc.qt.io/qt-5/qfiledialog.html#getOpenFileName the string can contain
|
// Per http://doc.qt.io/qt-5/qfiledialog.html#getOpenFileName the string can contain
|
||||||
// multiple filters separated by semicolons
|
// multiple filters separated by semicolons
|
||||||
|
|
|
@ -216,7 +216,8 @@ ApplicationWindow {
|
||||||
property var builder: Component {
|
property var builder: Component {
|
||||||
FileDialog {
|
FileDialog {
|
||||||
title: "Open File"
|
title: "Open File"
|
||||||
filter: "*.js"
|
filter: "All Files (*.*)"
|
||||||
|
//filter: "HTML files (*.html);;Other(*.png)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue