mirror of
https://github.com/lubosz/overte.git
synced 2025-04-13 06:42:10 +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:"
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: root.selectDirectory ? parent.right : selectionType.left
|
||||
rightMargin: root.selectDirectory ? 0 : hifi.dimensions.contentSpacing.x
|
||||
right: selectionType.visible ? selectionType.left: parent.right
|
||||
rightMargin: selectionType.visible ? hifi.dimensions.contentSpacing.x : 0
|
||||
bottom: buttonRow.top
|
||||
bottomMargin: hifi.dimensions.contentSpacing.y
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ ModalWindow {
|
|||
left: buttonRow.left
|
||||
right: parent.right
|
||||
}
|
||||
visible: !selectDirectory
|
||||
visible: !selectDirectory && filtersCount > 1
|
||||
KeyNavigation.left: fileTableView
|
||||
KeyNavigation.right: openButton
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ ComboBox {
|
|||
id: root
|
||||
property string filtersString: "All Files (*.*)";
|
||||
property var currentFilter: [ "*.*" ];
|
||||
property int filtersCount: filtersString.split(';;').length
|
||||
|
||||
// Per http://doc.qt.io/qt-5/qfiledialog.html#getOpenFileName the string can contain
|
||||
// multiple filters separated by semicolons
|
||||
|
|
|
@ -216,7 +216,8 @@ ApplicationWindow {
|
|||
property var builder: Component {
|
||||
FileDialog {
|
||||
title: "Open File"
|
||||
filter: "*.js"
|
||||
filter: "All Files (*.*)"
|
||||
//filter: "HTML files (*.html);;Other(*.png)"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue