Commit 3d6844e2 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Display name of phrase.

When hovering over progress bar phrase symbol, show what is the name
of the target phrase.
parent 56ab14b5
......@@ -67,6 +67,7 @@ Item {
Rectangle {
id: phraseBox
property Phrase currentPhrase : model.dataRole
property bool isSelected : boxMouseArea.containsMouse
signal phraseSelected()
width: boxMouseArea.containsMouse ? parent.width + 15 : parent.width
......@@ -127,6 +128,31 @@ Item {
}
}
}
Item {
width: phraseText.width
height: phraseText.height
x: {
if (phraseItem.x - phraseText.width/2 < 0) {
return 0
}
if (phraseItem.x + phraseText.width/2 > progressView.width) {
return (progressView.width - phraseItem.x) - phraseText.width
}
return -Math.floor(phraseText.width/2) + phraseItem.width/2
}
anchors {
bottom: phraseBox.verticalCenter
bottomMargin: 30
}
PlasmaComponents.Label {
id: phraseText
anchors.centerIn: parent
visible: phraseBox.isSelected
text: phraseBox.currentPhrase.text
font.italic: true
}
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment