2019-04-11 01:17:29 +00:00
|
|
|
import QtQuick 2.9
|
|
|
|
|
|
|
|
import "." as MoneroComponents
|
|
|
|
import "effects/" as MoneroEffects
|
|
|
|
|
|
|
|
Text {
|
|
|
|
// When using this component, please note that if you use a color different
|
|
|
|
// than `defaultFontColor`, you are required to also define `themeTransitionXColor`.
|
|
|
|
// If you do not set these the component will receive the wrong color after a transition.
|
|
|
|
// If you do not want to set these, use `themeTransition: false`.
|
|
|
|
id: root
|
|
|
|
property bool themeTransition: true
|
|
|
|
property string themeTransitionBlackColor: ""
|
|
|
|
property string themeTransitionWhiteColor: ""
|
2021-04-15 00:04:50 +00:00
|
|
|
property alias tooltip: tooltip.text
|
2021-05-19 16:36:44 +00:00
|
|
|
property alias tooltipLeft: tooltip.tooltipLeft
|
|
|
|
property alias tooltipIconVisible: tooltip.tooltipIconVisible
|
|
|
|
property alias tooltipPopup: tooltip.tooltipPopup
|
2019-04-11 01:17:29 +00:00
|
|
|
font.family: MoneroComponents.Style.fontMedium.name
|
|
|
|
font.bold: false
|
2019-04-25 19:09:23 +00:00
|
|
|
font.pixelSize: 14
|
2019-04-11 01:17:29 +00:00
|
|
|
textFormat: Text.PlainText
|
|
|
|
|
|
|
|
MoneroEffects.ColorTransition {
|
|
|
|
enabled: root.themeTransition
|
|
|
|
themeTransition: root.themeTransition
|
|
|
|
targetObj: root
|
|
|
|
duration: 750
|
|
|
|
blackColor: root.themeTransitionBlackColor !== "" ? root.themeTransitionBlackColor : MoneroComponents.Style._b_defaultFontColor
|
|
|
|
whiteColor: root.themeTransitionWhiteColor !== "" ? root.themeTransitionWhiteColor : MoneroComponents.Style._w_defaultFontColor
|
|
|
|
}
|
2021-04-15 00:04:50 +00:00
|
|
|
|
|
|
|
MoneroComponents.Tooltip {
|
|
|
|
id: tooltip
|
|
|
|
anchors.top: parent.top
|
2021-05-19 16:36:44 +00:00
|
|
|
anchors.left: tooltipIconVisible ? parent.right : parent.left
|
2021-04-15 00:04:50 +00:00
|
|
|
}
|
2019-04-11 01:17:29 +00:00
|
|
|
}
|