From 405babd5ce04983faf045f750c73181e8a13a461 Mon Sep 17 00:00:00 2001 From: jonymt <johanmt@yandex.ru> Date: Wed, 2 Oct 2019 17:26:10 +0200 Subject: [PATCH] [*] changed design for wallet tip --- .../DapUiQmlScreenHistory.qml | 43 +++++++++---------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/CellFrameDashboardGUI/DapUiQmlScreenHistory.qml b/CellFrameDashboardGUI/DapUiQmlScreenHistory.qml index 05772a700..eb8f22e1f 100644 --- a/CellFrameDashboardGUI/DapUiQmlScreenHistory.qml +++ b/CellFrameDashboardGUI/DapUiQmlScreenHistory.qml @@ -115,15 +115,15 @@ DapUiQmlScreenHistoryForm { anchors.fill: parent hoverEnabled: true - onMouseXChanged: { - tipTokenName.x = mouse.x; - } - - onMouseYChanged: { - tipTokenName.y = mouse.y; + onPositionChanged: { + if(!hovered) return; + var globalCoord = mapToItem(dapUiQmlScreenHistory, mouse.x, mouse.y); + tipTokenName.x = globalCoord.x - tipTokenName.width / 2; + tipTokenName.y = globalCoord.y - (tipTokenName.height + 5); } onEntered: { + tipTokenName.text = dapNumberWallet.text; tipTokenName.visible = true; } @@ -216,23 +216,6 @@ DapUiQmlScreenHistoryForm { } } - - // Number wallet tip - Rectangle { - id: tipTokenName - color: "#FFFFFF"; - width: contentChildren.width - height: contentChildren.height - visible: false - - Text { - text: dapNumberWallet.text - color: "#4F5357" - font.family: "Regular" - font.pixelSize: 14 * pt - } - } - // Underline Rectangle { x: dapTokenNameContainer.x @@ -244,6 +227,20 @@ DapUiQmlScreenHistoryForm { } + // Number wallet tip + Label { + id: tipTokenName + padding: 3 * pt + color: "#4F5357" + font.family: "Regular" + font.pixelSize: 14 * pt + background: Rectangle { + anchors.fill: parent + color: "#FFFFFF"; + border.color: "#80000000" + border.width: 1 * pt + } + } } /*##^## Designer { -- GitLab