diff --git a/components/TableDropdown.qml b/components/TableDropdown.qml index de375ed8..c4396008 100644 --- a/components/TableDropdown.qml +++ b/components/TableDropdown.qml @@ -120,8 +120,8 @@ Item { repeat: true running: false onTriggered: { - if(((tipItem.visible && !tipItem.containsMouse) || !tipItem.visible) && !mouseArea.containsMouse) { - tipItem.visible = false + if(((appWindow.toolTip.visible && !appWindow.toolTip.containsMouse) || !appWindow.toolTip.visible) && !mouseArea.containsMouse) { + appWindow.toolTip.visible = false dropdown.expanded = false currentIndex = -1 timer.stop() @@ -210,14 +210,15 @@ Item { onContainsMouseChanged: { if(containsMouse) { - var pos = rootItem.mapFromItem(delegate, 30, -20) - tipItem.text = name - tipItem.x = pos.x + appWindow.x - if(tipItem.height > 30) - pos.y -= tipItem.height - 30 - tipItem.y = pos.y + appWindow.y - tipItem.visible = true - tipItem.raise() + var pos = rootItem.mapFromItem(delegate, 30, -25) + appWindow.toolTip.text = name + appWindow.toolTip.x = pos.x - appWindow.toolTip.width +// if(appWindow.toolTip.height > 30) +// pos.y -= appWindow.toolTip.height - 30 + appWindow.toolTip.y = pos.y + appWindow.toolTip.visible = true + appWindow.toolTip.z = 3 + } } diff --git a/main.qml b/main.qml index bb9e1b68..467a4951 100644 --- a/main.qml +++ b/main.qml @@ -60,6 +60,7 @@ ApplicationWindow { property bool daemonSynced: false property int maxWindowHeight: (Screen.height < 900)? 720 : 800; property bool daemonRunning: false + property alias toolTip: toolTip // true if wallet ever synchronized property bool walletInitialized : false @@ -999,6 +1000,37 @@ ApplicationWindow { } } } + + // new ToolTip + Rectangle { + id: toolTip + property alias text: content.text + width: content.width + 12 + height: content.height + 17 + color: "#FF6C3C" + //radius: 3 + visible:false; + + Image { + id: tip + anchors.top: parent.bottom + anchors.right: parent.right + anchors.rightMargin: 5 + source: "../images/tip.png" + } + + Text { + id: content + anchors.horizontalCenter: parent.horizontalCenter + y: 6 + lineHeight: 0.7 + font.family: "Arial" + font.pixelSize: 12 + font.letterSpacing: -1 + color: "#FFFFFF" + } + } + } onClosing: { // Close wallet