mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-28 17:29:19 +00:00
- Process GUI events before accepting a call in order to be synchronized with Call objects - Revert window variable naming - Change open window order when receive call Fix : Show Notifications while in fullscreen Fix : show settings in fullscreen QuickFix: - Set Minimum Width on Tooltips - Show full path on log folder selection - Add Conference participant filter to show only users that are in conference - Add test on Player to avoid crash if it cannot be instanciated before - Window position when opening in fullscreen
108 lines
2.4 KiB
QML
108 lines
2.4 KiB
QML
import QtQuick 2.7
|
|
import QtQuick.Dialogs 1.2
|
|
|
|
import Common 1.0
|
|
import Common.Styles 1.0
|
|
import Utils 1.0
|
|
|
|
// =============================================================================
|
|
|
|
TextField {
|
|
id: textField
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
property alias selectExisting: fileDialog.selectExisting
|
|
property alias selectFolder: fileDialog.selectFolder
|
|
property alias title: fileDialog.title
|
|
|
|
property string selectedFile: ''
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
signal accepted (var selectedFile)
|
|
signal rejected
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
text: {
|
|
var path = textField.selectedFile
|
|
return path.length ? path : ''
|
|
}
|
|
|
|
tools: Item {
|
|
height: parent.height
|
|
width: FileChooserButtonStyle.tools.width
|
|
|
|
Rectangle {
|
|
anchors {
|
|
fill: parent
|
|
margins: TextFieldStyle.background.border.width
|
|
}
|
|
|
|
color: mouseArea.pressed
|
|
? FileChooserButtonStyle.tools.button.color.pressed
|
|
: (
|
|
mouseArea.containsMouse
|
|
? FileChooserButtonStyle.tools.button.color.hovered
|
|
: FileChooserButtonStyle.tools.button.color.normal
|
|
)
|
|
|
|
Icon {
|
|
anchors.centerIn: parent
|
|
|
|
icon: (textField.selectFolder ? 'folder' : 'file') + (mouseArea.pressed
|
|
? '_pressed'
|
|
: (
|
|
mouseArea.containsMouse
|
|
? '_hovered'
|
|
: '_normal'
|
|
)
|
|
)
|
|
|
|
iconSize: FileChooserButtonStyle.tools.button.iconSize
|
|
}
|
|
}
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
FileDialog {
|
|
id: fileDialog
|
|
|
|
folder: {
|
|
var selectedFile = textField.selectedFile
|
|
|
|
if (!selectedFile.length) {
|
|
return ''
|
|
}
|
|
|
|
return Utils.getUriFromSystemPath(
|
|
textField.selectFolder
|
|
? selectedFile
|
|
: Utils.dirname(selectedFile)
|
|
)
|
|
}
|
|
|
|
onAccepted: {
|
|
var selectedFile = Utils.getSystemPathFromUri(fileUrl)
|
|
|
|
textField.selectedFile = selectedFile
|
|
textField.accepted(selectedFile)
|
|
}
|
|
|
|
onRejected: textField.rejected()
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
MouseArea {
|
|
id: mouseArea
|
|
|
|
anchors.fill: parent
|
|
enabled: !textField.readOnly
|
|
hoverEnabled: true
|
|
|
|
onClicked: fileDialog.open()
|
|
}
|
|
}
|