diff --git a/src/qml/Desktop/DesktopPlayerControls.qml b/src/qml/Desktop/DesktopPlayerControls.qml index ef4e01bd..f1c4abd4 100644 --- a/src/qml/Desktop/DesktopPlayerControls.qml +++ b/src/qml/Desktop/DesktopPlayerControls.qml @@ -115,7 +115,7 @@ FocusScope { enabled: AudioManager.canSkipBackward Controls.ToolTip.visible: hovered - Controls.ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay Controls.ToolTip.text: i18n("Seek backward") } Controls.ToolButton { @@ -125,7 +125,7 @@ FocusScope { enabled: AudioManager.canPlay Controls.ToolTip.visible: hovered - Controls.ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay Controls.ToolTip.text: AudioManager.playbackState === KMediaSession.PlayingState ? i18n("Pause") : i18n("Play") } Controls.ToolButton { @@ -134,7 +134,7 @@ FocusScope { enabled: AudioManager.canSkipForward Controls.ToolTip.visible: hovered - Controls.ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay Controls.ToolTip.text: i18n("Seek forward") } Controls.ToolButton { @@ -143,7 +143,7 @@ FocusScope { enabled: AudioManager.canGoNext Controls.ToolTip.visible: hovered - Controls.ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay Controls.ToolTip.text: i18n("Skip forward") } Controls.ToolButton { @@ -168,7 +168,7 @@ FocusScope { implicitHeight: playButton.height Controls.ToolTip.visible: hovered - Controls.ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay Controls.ToolTip.text: i18n("Playback rate:") + " " + AudioManager.playbackRate.toFixed(2) + "x" } } @@ -225,11 +225,10 @@ FocusScope { action: chapterAction display: playerControlToolBar.tooNarrowChapter ? Controls.AbstractButton.IconOnly : Controls.AbstractButton.TextBesideIcon visible: chapterAction.visible && !playerControlToolBar.tooNarrowOverflow - Controls.ToolTip { - visible: parent.hovered - delay: Qt.styleHints.mousePressAndHoldInterval - text: i18nc("@action:button", "Show chapter list") - } + + Controls.ToolTip.visible: parent.hovered + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay + Controls.ToolTip.text: i18nc("@action:button", "Show chapter list") } Controls.ToolButton { @@ -237,11 +236,10 @@ FocusScope { action: infoAction display: playerControlToolBar.tooNarrowExtra ? Controls.AbstractButton.IconOnly : Controls.AbstractButton.TextBesideIcon visible: infoAction.visible && !playerControlToolBar.tooNarrowOverflow - Controls.ToolTip { - visible: parent.hovered - delay: Qt.styleHints.mousePressAndHoldInterval - text: i18nc("@action:button", "Show episode info") - } + + Controls.ToolTip.visible: parent.hovered + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay + Controls.ToolTip.text: i18nc("@action:button", "Show episode info") } Controls.ToolButton { @@ -249,11 +247,10 @@ FocusScope { action: sleepAction display: playerControlToolBar.tooNarrowExtra ? Controls.AbstractButton.IconOnly : Controls.AbstractButton.TextBesideIcon visible: !playerControlToolBar.tooNarrowOverflow - Controls.ToolTip { - visible: parent.hovered - delay: Qt.styleHints.mousePressAndHoldInterval - text: i18nc("@action:button", "Open sleep timer settings") - } + + Controls.ToolTip.visible: parent.hovered + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay + Controls.ToolTip.text: i18nc("@action:button", "Open sleep timer settings") } } @@ -264,11 +261,11 @@ FocusScope { icon.name: AudioManager.muted ? "player-volume-muted" : "player-volume" enabled: AudioManager.PlaybackState != AudioManager.StoppedState && AudioManager.canPlay checked: volumePopup.visible - Controls.ToolTip { - visible: parent.hovered - delay: Qt.styleHints.mousePressAndHoldInterval - text: i18nc("@action:button", "Open volume settings") - } + + Controls.ToolTip.visible: parent.hovered + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay + Controls.ToolTip.text: i18nc("@action:button", "Open volume settings") + onClicked: { if (volumePopup.visible) { volumePopup.close(); @@ -351,11 +348,11 @@ FocusScope { enabled: AudioManager.PlaybackState != AudioManager.StoppedState && AudioManager.canPlay icon.name: AudioManager.muted ? "player-volume-muted" : "player-volume" onClicked: AudioManager.muted = !AudioManager.muted - Controls.ToolTip { - visible: parent.hovered - delay: Qt.styleHints.mousePressAndHoldInterval - text: i18nc("@action:button", "Toggle mute") - } + + Controls.ToolTip.visible: parent.hovered + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay + Controls.ToolTip.text: i18nc("@action:button", "Toggle mute") + } } } @@ -368,11 +365,11 @@ FocusScope { display: Controls.AbstractButton.IconOnly visible: playerControlToolBar.tooNarrowOverflow checked: overflowMenu.visible - Controls.ToolTip { - visible: parent.hovered - delay: Qt.styleHints.mousePressAndHoldInterval - text: i18nc("@action:button", "Show more") - } + + Controls.ToolTip.visible: parent.hovered + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay + Controls.ToolTip.text: i18nc("@action:button", "Show more") + onClicked: { if (overflowMenu.visible) { overflowMenu.dismiss(); diff --git a/src/qml/FeedListDelegate.qml b/src/qml/FeedListDelegate.qml index 2bb344c8..b197686f 100644 --- a/src/qml/FeedListDelegate.qml +++ b/src/qml/FeedListDelegate.qml @@ -233,11 +233,9 @@ Controls.ItemDelegate { pageStack.push("qrc:/FeedDetailsPage.qml", {"feed": feed}) } - Controls.ToolTip { - text: feed.name - delay: Qt.styleHints.mousePressAndHoldInterval - y: cardSize + cardMargin - } + Controls.ToolTip.text: feed.name + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay + Controls.ToolTip.y: cardSize + cardMargin Kirigami.MenuDialog { id: actionOverlay diff --git a/src/qml/Mobile/MobilePlayerControls.qml b/src/qml/Mobile/MobilePlayerControls.qml index d7fcec7f..74709d57 100644 --- a/src/qml/Mobile/MobilePlayerControls.qml +++ b/src/qml/Mobile/MobilePlayerControls.qml @@ -339,11 +339,11 @@ Kirigami.Page { icon.name: AudioManager.muted ? "player-volume-muted" : "player-volume" enabled: AudioManager.PlaybackState != AudioManager.StoppedState && AudioManager.canPlay checked: volumePopup.visible - Controls.ToolTip { - visible: parent.hovered - delay: Qt.styleHints.mousePressAndHoldInterval - text: i18nc("@action:button", "Open volume settings") - } + + Controls.ToolTip.visible: parent.hovered + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay + Controls.ToolTip.text: i18nc("@action:button", "Open volume settings") + onClicked: { if (volumePopup.visible) { volumePopup.close(); @@ -369,11 +369,11 @@ Kirigami.Page { enabled: AudioManager.PlaybackState != AudioManager.StoppedState && AudioManager.canPlay icon.name: AudioManager.muted ? "player-volume-muted" : "player-volume" onClicked: AudioManager.muted = !AudioManager.muted - Controls.ToolTip { - visible: parent.hovered - delay: Qt.styleHints.mousePressAndHoldInterval - text: i18nc("@action:button", "Toggle mute") - } + + Controls.ToolTip.visible: parent.hovered + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay + Controls.ToolTip.text: i18nc("@action:button", "Toggle mute") + } Controls.Slider { diff --git a/src/qml/PlaybackRateCustomizerDialog.qml b/src/qml/PlaybackRateCustomizerDialog.qml index 13c1c143..c24f46bd 100644 --- a/src/qml/PlaybackRateCustomizerDialog.qml +++ b/src/qml/PlaybackRateCustomizerDialog.qml @@ -63,7 +63,7 @@ Kirigami.Dialog { icon.name: "list-add" text: i18nc("@action:button Add new playback rate value to list", "Add") Controls.ToolTip.visible: hovered - Controls.ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay Controls.ToolTip.text: i18nc("@info:tooltip", "Add new playback rate value to list") onClicked: { var found = false; @@ -96,7 +96,7 @@ Kirigami.Dialog { implicitHeight: addButton.height onClicked: rateSlider.value = Math.max(0.0, rateSlider.value - 0.05) Controls.ToolTip.visible: hovered - Controls.ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay Controls.ToolTip.text: i18nc("@action:button", "Decrease playback rate") } @@ -115,7 +115,7 @@ Kirigami.Dialog { implicitHeight: addButton.height onClicked: rateSlider.value = Math.min(3.0, rateSlider.value + 0.05) Controls.ToolTip.visible: hovered - Controls.ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay Controls.ToolTip.text: i18nc("@action:button", "Increase playback rate") } } diff --git a/src/qml/UpdateNotification.qml b/src/qml/UpdateNotification.qml index 012c0b4f..66e637b4 100644 --- a/src/qml/UpdateNotification.qml +++ b/src/qml/UpdateNotification.qml @@ -86,7 +86,7 @@ Rectangle { Layout.rightMargin: Kirigami.Units.largeSpacing visible: showAbortButton Controls.ToolTip.visible: hovered - Controls.ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval + Controls.ToolTip.delay: Kirigami.Units.toolTipDelay Controls.ToolTip.text: i18n("Abort") text: i18n("Abort") icon.name: "edit-delete-remove"