Unfortunately there is no good way to resize tooptip dynamically if html
image is used. In other hand if tooltip type set to "names" it is
possible to resize tooptips to content size.

+ update gitignore
This commit is contained in:
Evgenii Alekseev 2016-01-28 12:44:45 +03:00
parent d8d2311621
commit 4b679ff570
2 changed files with 8 additions and 1 deletions

1
.gitignore vendored
View File

@ -43,6 +43,7 @@ build
*pkg.tar.[gx]z
src
pkg
*.deb
# clion settings
.idea

View File

@ -113,7 +113,7 @@ Item {
for (var i=0; i<repeater.count; i++) {
if (!repeater.itemAt(i)) {
if (debug) console.info("Nothing to do here", i)
if (debug) console.info("Nothing to do here yet", i)
timer.start()
return
}
@ -143,6 +143,12 @@ Item {
for (var i=0; i<repeater.count; i++) {
repeater.itemAt(i).tooltip.text = dpAdds.toolTipImage(i + 1)
// resize text tooltip to content size
// this hack does not work for images-based tooltips
if (tooltipSettings.tooltipType == "names") {
repeater.itemAt(i).tooltip.height = repeater.itemAt(i).tooltip.implicitHeight
repeater.itemAt(i).tooltip.width = repeater.itemAt(i).tooltip.implicitWidth
}
}
}