Skip to content
Snippets Groups Projects
Commit e9c2c881 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Hugo Beauzée-Luyssen
Browse files

qml: use ToolTipExt where possible

parent baab6e95
No related branches found
No related tags found
1 merge request!790qml: add and use themed tooltip
Pipeline #150920 passed with stage
in 19 minutes and 56 seconds
......@@ -143,7 +143,7 @@ WindowDialog {
mainInterface.controlbarProfileModel.selectedProfile = (mainInterface.controlbarProfileModel.rowCount() - 1)
}
ToolTip.visible: hovered
toolTip.visible: hovered
}
Widgets.IconToolButton {
......@@ -156,7 +156,7 @@ WindowDialog {
mainInterface.controlbarProfileModel.currentModel.injectDefaults(false)
}
ToolTip.visible: hovered
toolTip.visible: hovered
}
Widgets.IconToolButton {
......@@ -167,7 +167,7 @@ WindowDialog {
mainInterface.controlbarProfileModel.deleteSelectedProfile()
}
ToolTip.visible: hovered
toolTip.visible: hovered
}
}
......
......@@ -153,10 +153,10 @@ T.Popup {
highlighted: index === 3
&& player.subtitleTracks.multiSelect
ToolTip.visible: (hovered || activeFocus)
ToolTip.text: modelData.tooltip
ToolTip.delay: 1000
ToolTip.toolTip.z: 2
toolTip.visible: (hovered || activeFocus)
toolTip.text: modelData.tooltip
toolTip.delay: 1000
toolTip.z: 2
Navigation.parentItem: btnsCol
......
......@@ -105,7 +105,7 @@ AbstractButton {
width: VLCStyle.dp(60)
height: VLCStyle.dp(60)
ToolTip {
Widgets.ToolTipExt {
x: parent.x
visible: artworkInfoItem.visible
......@@ -113,14 +113,9 @@ AbstractButton {
&& (artworkInfoItem.hovered || artworkInfoItem.visualFocus)
delay: 500
contentItem: Text {
text: i18n.qtr("%1\n%2\n%3").arg(titleLabel.text).arg(artistLabel.text).arg(progressIndicator.text)
color: colors.tooltipTextColor
}
text: i18n.qtr("%1\n%2\n%3").arg(titleLabel.text).arg(artistLabel.text).arg(progressIndicator.text)
background: Rectangle {
color: colors.tooltipColor
}
colors: artworkInfoItem.colors
}
}
}
......
......@@ -464,9 +464,11 @@ Control {
}
}
ToolTip {
Widgets.ToolTipExt {
id: plInfoTooltip
delay: 750
colors: root.colors
}
delegate: PlaylistDelegate {
......
......@@ -34,4 +34,6 @@ IconToolButton {
: colors.blendColors(colors.playerBg, colors.playerControlBarFg, 0.75)
colorFocus: colors.bgFocus
toolTip.colors: colors
}
......@@ -21,6 +21,7 @@ import QtQuick.Controls 2.4
import org.videolan.vlc 0.1
import "qrc:///widgets/" as Widgets
import "qrc:///style/"
ToolButton {
......@@ -49,6 +50,8 @@ ToolButton {
// Aliases
property alias toolTip: toolTip
// active border color
property alias colorFocus: background.activeBorderColor
......@@ -58,9 +61,6 @@ ToolButton {
enabled: !paintOnly
ToolTip.text: text
ToolTip.delay: 500
// Keys
Keys.priority: Keys.AfterItem
......@@ -69,6 +69,12 @@ ToolButton {
// Childs
Widgets.ToolTipExt {
id: toolTip
text: control.text
delay: 500
}
background: AnimatedBackground {
id: background
......
......@@ -20,7 +20,7 @@ import QtQuick.Controls 2.4
import "qrc:///style/"
ToolTip {
ToolTipExt {
id: pointingTooltip
margins: 0
......@@ -29,19 +29,9 @@ ToolTip {
x: _x
y: pos.y - (implicitHeight + arrowArea.implicitHeight + VLCStyle.dp(7.5))
font.pixelSize: VLCStyle.fontSize_normal
property VLCColors colors: VLCStyle.colors
readonly property real _x: pos.x - (width / 2)
property point pos
contentItem: Label {
text: pointingTooltip.text
font: pointingTooltip.font
color: colors.tooltipTextColor
}
background: Rectangle {
border.color: colors.border
color: colors.tooltipColor
......
......@@ -29,7 +29,7 @@ MouseArea {
hoverEnabled: true
propagateComposedEvents: true
ToolTip {
ToolTipExt {
id: tip
text: "plop"
delay: VLCStyle.delayToolTipAppear
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment