Quick GUI: Show full file path as tooltip
This commit is contained in:
parent
65d41276e8
commit
a5ffe32861
34
qml/main.qml
34
qml/main.qml
|
@ -9,6 +9,17 @@ Kirigami.ApplicationWindow {
|
||||||
property alias showPasswordsOnFocus: showPasswordsOnFocusSwitch.checked
|
property alias showPasswordsOnFocus: showPasswordsOnFocusSwitch.checked
|
||||||
|
|
||||||
header: Kirigami.ApplicationHeader {
|
header: Kirigami.ApplicationHeader {
|
||||||
|
backButtonEnabled: true
|
||||||
|
minimumHeight: 0
|
||||||
|
preferredHeight: Kirigami.Units.gridUnit * 2.3
|
||||||
|
maximumHeight: Kirigami.Units.gridUnit * 3
|
||||||
|
|
||||||
|
Controls.TextField {
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
placeholderText: qsTr("Filter")
|
||||||
|
width: Kirigami.Units.gridUnit * 8
|
||||||
|
}
|
||||||
}
|
}
|
||||||
globalDrawer: Kirigami.GlobalDrawer {
|
globalDrawer: Kirigami.GlobalDrawer {
|
||||||
id: leftMenu
|
id: leftMenu
|
||||||
|
@ -25,6 +36,7 @@ Kirigami.ApplicationWindow {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
|
id: fileNameLabel
|
||||||
padding: 8
|
padding: 8
|
||||||
wrapMode: Controls.Label.Wrap
|
wrapMode: Controls.Label.Wrap
|
||||||
fontSizeMode: Text.HorizontalFit
|
fontSizeMode: Text.HorizontalFit
|
||||||
|
@ -33,6 +45,21 @@ Kirigami.ApplicationWindow {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: nativeInterface.fileOpen ? nativeInterface.fileName : qsTr(
|
text: nativeInterface.fileOpen ? nativeInterface.fileName : qsTr(
|
||||||
"No file opened")
|
"No file opened")
|
||||||
|
MouseArea {
|
||||||
|
id: fileNameMouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
}
|
||||||
|
Controls.ToolTip {
|
||||||
|
z: 1000
|
||||||
|
text: nativeInterface.filePath
|
||||||
|
visible: text ? fileNameMouseArea.containsMouse : false
|
||||||
|
delay: Qt.styleHints.mousePressAndHoldInterval
|
||||||
|
onAboutToShow: {
|
||||||
|
x = fileNameMouseArea.mouseX + 10
|
||||||
|
y = fileNameMouseArea.mouseY + 10
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
actions: [
|
actions: [
|
||||||
|
@ -82,13 +109,6 @@ Kirigami.ApplicationWindow {
|
||||||
text: qsTr("Show passwords on focus")
|
text: qsTr("Show passwords on focus")
|
||||||
checked: true
|
checked: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.Label {
|
|
||||||
wrapMode: Controls.Label.Wrap
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: nativeInterface.fileOpen ? nativeInterface.filePath : qsTr(
|
|
||||||
"No file opened")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
contextDrawer: Kirigami.ContextDrawer {
|
contextDrawer: Kirigami.ContextDrawer {
|
||||||
id: contextDrawer
|
id: contextDrawer
|
||||||
|
|
Loading…
Reference in New Issue