[multimedia/haruna] src: tooltips: show when alt key is pressed even when disabled in settings

George Florea Bănuș <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 4e945a896f7596d73a1972b37505ca54345793ca by George Florea Bănuș.
Committed on 16/08/2026 at 16:25.
Pushed by georgefb into branch 'master'.

tooltips: show when alt key is pressed even when disabled in settings

M  +7    -3    src/playlist/Playlist.qml
M  +3    -1    src/playlist/PlaylistTabDelegate.qml
M  +15   -5    src/qml/Footer.qml
M  +3    -1    src/qml/HProgressBar.qml
M  +6    -1    src/qml/Haruna/Components/ColorPickerButton.qml
M  +6    -2    src/qml/Haruna/Components/SubtitlesFolders.qml
M  +6    -2    src/qml/Settings/AudioSettings.qml
M  +3    -1    src/qml/Settings/CustomCommandsSettings.qml
M  +12   -4    src/qml/Settings/PlaybackSettings.qml
M  +6    -2    src/qml/Settings/PlaylistSettings.qml
M  +24   -8    src/qml/Settings/SubtitlesSettings.qml
M  +3    -1    src/qml/Settings/VideoSettings.qml

https://invent.kde.org/multimedia/haruna/-/commit/4e945a896f7596d73a1972b37505ca54345793ca

diff --git a/src/playlist/Playlist.qml b/src/playlist/Playlist.qml
index 2cb77e9b..6045a94c 100644
--- a/src/playlist/Playlist.qml
+++ b/src/playlist/Playlist.qml
@@ -123,7 +123,9 @@ ResizeablePage {
 
                     ToolTip {
                         text: KI18n.i18nc("@action:button", "Add new playlist")
-                        visible: addPlaylistButton.hovered && GeneralSettings.showExplanatoryToolTips
+                        delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                        visible: addPlaylistButton.hovered
+                                 && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                     }
                 }
             }
@@ -427,7 +429,7 @@ ResizeablePage {
                         onTriggered: {
                             playlistsManager.visiblePlaylist.updateMetadata()
                         }
-                        tooltip: GeneralSettings.showExplanatoryToolTips
+                        tooltip: (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                                  ? KI18n.i18nc("@info:tooltip", "Update metadata for all files in the playlist\n\n"+
                                                "Update metadata in the database with metadata inside the file.\n" +
                                                "Metadata is stored in the database for faster retrieval.")
@@ -661,7 +663,9 @@ ResizeablePage {
                     ToolTip {
                         text: KI18n.i18nc("@info:tooltip", "Update metadata in the database with metadata inside the file.\n" +
                                           "Metadata is stored in the database for faster retrieval.")
-                        visible: updateMetadataMenuItem.hovered && GeneralSettings.showExplanatoryToolTips
+                        delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                        visible: updateMetadataMenuItem.hovered
+                                 && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                     }
                 }
 
diff --git a/src/playlist/PlaylistTabDelegate.qml b/src/playlist/PlaylistTabDelegate.qml
index 45315726..4aebab09 100644
--- a/src/playlist/PlaylistTabDelegate.qml
+++ b/src/playlist/PlaylistTabDelegate.qml
@@ -209,7 +209,9 @@ TabButton {
 
             ToolTip {
                 text: KI18n.i18nc("@info:tooltip", "Click and hold")
-                visible: rightItemHover.hovered && GeneralSettings.showExplanatoryToolTips
+                delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                visible: rightItemHover.hovered
+                         && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
             }
         }
 
diff --git a/src/qml/Footer.qml b/src/qml/Footer.qml
index 821d2012..9f3a1c1c 100644
--- a/src/qml/Footer.qml
+++ b/src/qml/Footer.qml
@@ -150,7 +150,9 @@ Item {
                         id: playPauseButtonToolTip
 
                         text: root.m_mpv.pause ? KI18n.i18nc("@info:tooltip", "Start playback") : KI18n.i18nc("@info:tooltip", "Pause playback")
-                        visible: playPauseButton.hovered && GeneralSettings.showExplanatoryToolTips
+                        delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                        visible: playPauseButton.hovered
+                                 && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                     }
                 }
 
@@ -168,7 +170,9 @@ Item {
 
                     ToolTip {
                         text: KI18n.i18nc("@info:tooltip", "Play previous file")
-                        visible: playPreviousFile.hovered && GeneralSettings.showExplanatoryToolTips
+                        delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                        visible: playPreviousFile.hovered
+                                 && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                     }
                 }
 
@@ -186,7 +190,9 @@ Item {
 
                     ToolTip {
                         text: KI18n.i18nc("@info:tooltip", "Play next file")
-                        visible: playNextFile.hovered && GeneralSettings.showExplanatoryToolTips
+                        delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                        visible: playNextFile.hovered
+                                 && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                     }
                 }
 
@@ -203,7 +209,9 @@ Item {
 
                     ToolTip {
                         text: KI18n.i18nc("@info:tooltip", "Open chapters menu")
-                        visible: chaptersMenuButton.hovered && GeneralSettings.showExplanatoryToolTips
+                        delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                        visible: chaptersMenuButton.hovered
+                                 && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                     }
                 }
 
@@ -228,7 +236,9 @@ Item {
 
                     ToolTip {
                         text: HarunaApp.actions.muteAction.text
-                        visible: mute.hovered && GeneralSettings.showExplanatoryToolTips
+                        delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                        visible: mute.hovered
+                                 && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                     }
                 }
 
diff --git a/src/qml/HProgressBar.qml b/src/qml/HProgressBar.qml
index 41fcae92..86123de9 100644
--- a/src/qml/HProgressBar.qml
+++ b/src/qml/HProgressBar.qml
@@ -342,7 +342,9 @@ RowLayout {
 
                         ToolTip {
                             text: KI18n.i18nc("@info:tooltip", "Automatically skips chapters containing certain words/characters.\nCheck “Playback” settings for more details.")
-                            visible: skipChaptersCheckBox.hovered && GeneralSettings.showExplanatoryToolTips
+                            delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                            visible: skipChaptersCheckBox.hovered
+                                     && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                         }
                     }
                 }
diff --git a/src/qml/Haruna/Components/ColorPickerButton.qml b/src/qml/Haruna/Components/ColorPickerButton.qml
index 8496c308..fa7c77fc 100644
--- a/src/qml/Haruna/Components/ColorPickerButton.qml
+++ b/src/qml/Haruna/Components/ColorPickerButton.qml
@@ -11,6 +11,9 @@ import QtQuick.Dialogs
 import org.kde.ki18n
 import org.kde.kirigami as Kirigami
 
+import org.kde.haruna
+import org.kde.haruna.settings
+
 Rectangle {
     id: root
 
@@ -41,7 +44,9 @@ Rectangle {
 
     ToolTip {
         text: KI18n.i18nc("@info:tooltip", "Select a color")
-        visible: ma.containsMouse && GeneralSettings.showExplanatoryToolTips
+        delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+        visible: ma.containsMouse
+                 && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
     }
 
     ColorDialog {
diff --git a/src/qml/Haruna/Components/SubtitlesFolders.qml b/src/qml/Haruna/Components/SubtitlesFolders.qml
index e785b15c..6290dff6 100644
--- a/src/qml/Haruna/Components/SubtitlesFolders.qml
+++ b/src/qml/Haruna/Components/SubtitlesFolders.qml
@@ -127,7 +127,9 @@ ColumnLayout {
                             }
                             ToolTip {
                                 text: KI18n.i18nc("@info:tooltip", "Delete this folder from list")
-                                visible: deleteButton.hovered && GeneralSettings.showExplanatoryToolTips
+                                delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                                visible: deleteButton.hovered
+                                         && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                             }
                         }
 
@@ -146,7 +148,9 @@ ColumnLayout {
                             }
                             ToolTip {
                                 text: KI18n.i18nc("@info:tooltip", "Save changes")
-                                visible: saveButton.hovered && GeneralSettings.showExplanatoryToolTips
+                                delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                                visible: saveButton.hovered
+                                         && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                             }
                         }
 
diff --git a/src/qml/Settings/AudioSettings.qml b/src/qml/Settings/AudioSettings.qml
index 9223608d..a95e8d3e 100644
--- a/src/qml/Settings/AudioSettings.qml
+++ b/src/qml/Settings/AudioSettings.qml
@@ -204,7 +204,9 @@ SettingsBasePage {
                 }
                 ToolTip {
                     text: KI18n.i18nc("@info:tooltip", "Reset to default value")
-                    visible: resetPreampButton.hovered && GeneralSettings.showExplanatoryToolTips
+                    delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                    visible: resetPreampButton.hovered
+                             && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                 }
             }
 
@@ -240,7 +242,9 @@ SettingsBasePage {
                 }
                 ToolTip {
                     text: KI18n.i18nc("@info:tooltip", "Reset to default value")
-                    visible: resetFallbackButton.hovered && GeneralSettings.showExplanatoryToolTips
+                    delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                    visible: resetFallbackButton.hovered
+                             && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                 }
             }
             ToolTipButton {
diff --git a/src/qml/Settings/CustomCommandsSettings.qml b/src/qml/Settings/CustomCommandsSettings.qml
index af59d3fe..e556089b 100644
--- a/src/qml/Settings/CustomCommandsSettings.qml
+++ b/src/qml/Settings/CustomCommandsSettings.qml
@@ -105,7 +105,9 @@ SettingsBasePage {
                         ToolTip {
                             text: KI18n.i18nc("@info:tooltip", "Checked: property will be set at startup\n" +
                                         "Unchecked: property will not be set at startup")
-                            visible: toggleCommandCheckBox.hovered && GeneralSettings.showExplanatoryToolTips
+                            delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                            visible: toggleCommandCheckBox.hovered
+                                     && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                         }
                     }
 
diff --git a/src/qml/Settings/PlaybackSettings.qml b/src/qml/Settings/PlaybackSettings.qml
index 6d7a65bb..2fbfaf71 100644
--- a/src/qml/Settings/PlaybackSettings.qml
+++ b/src/qml/Settings/PlaybackSettings.qml
@@ -180,7 +180,9 @@ SettingsBasePage {
             ToolTip {
                 text: KI18n.i18nc("@info:tooltip open last played file setting",
                             "On startup it opens the file that was playing when the application was closed.")
-                visible: loadLastPlayedFileCheckBox.hovered && GeneralSettings.showExplanatoryToolTips
+                delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                visible: loadLastPlayedFileCheckBox.hovered
+                         && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
             }
         }
 
@@ -199,7 +201,9 @@ SettingsBasePage {
             ToolTip {
                 text: KI18n.i18nc("@info:tooltip pause on minimize setting",
                             "Pauses the player while the window is minimized, playback resumes when restored.")
-                visible: pauseOnMinimizeCheckBox.hovered && GeneralSettings.showExplanatoryToolTips
+                delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                visible: pauseOnMinimizeCheckBox.hovered
+                         && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
             }
         }
 
@@ -233,7 +237,9 @@ SettingsBasePage {
                              "Saves the file position during playback, opening the same file again will seek to the saved position.\n"
                              +"Position is saved every %1 seconds, except for the last 10 seconds of the video.",
                              timePositionSaveInterval.value)
-                visible: saveFilePositionCheckBox.hovered && GeneralSettings.showExplanatoryToolTips
+                delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                visible: saveFilePositionCheckBox.hovered
+                         && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
             }
         }
 
@@ -253,7 +259,9 @@ SettingsBasePage {
             ToolTip {
                 text: KI18n.i18nc("@info:tooltip start playing setting",
                             "The file will be playing after restoring the playback position")
-                visible: playOnResumeCheckBox.hovered && GeneralSettings.showExplanatoryToolTips
+                delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                visible: playOnResumeCheckBox.hovered
+                         && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
             }
         }
 
diff --git a/src/qml/Settings/PlaylistSettings.qml b/src/qml/Settings/PlaylistSettings.qml
index ad5969a3..4833ade0 100644
--- a/src/qml/Settings/PlaylistSettings.qml
+++ b/src/qml/Settings/PlaylistSettings.qml
@@ -191,7 +191,9 @@ SettingsBasePage {
 
             ToolTip {
                 text: KI18n.i18nc("@info:tooltip", "When checked the playlist goes on top of the video\nWhen unchecked the video is resized")
-                visible: overlayVideoCheckBox.hovered && GeneralSettings.showExplanatoryToolTips
+                delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                visible: overlayVideoCheckBox.hovered
+                         && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
             }
         }
 
@@ -260,7 +262,9 @@ SettingsBasePage {
             ToolTip {
                 text: KI18n.i18nc("@info:tooltip", "When checked the playlist state (visible/hidden) "
                             + "is remembered across launches")
-                visible: rememberStateCheckBox.hovered && GeneralSettings.showExplanatoryToolTips
+                delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                visible: rememberStateCheckBox.hovered
+                         && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
             }
         }
 
diff --git a/src/qml/Settings/SubtitlesSettings.qml b/src/qml/Settings/SubtitlesSettings.qml
index 29feb712..d9262c87 100644
--- a/src/qml/Settings/SubtitlesSettings.qml
+++ b/src/qml/Settings/SubtitlesSettings.qml
@@ -45,7 +45,9 @@ SettingsBasePage {
 
             ToolTip {
                 text: KI18n.i18nc("@info:tooltip", "When checked a subtitle track will be automatically selected and displayed")
-                visible: autoSelectSubtitles.hovered && GeneralSettings.showExplanatoryToolTips
+                delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                visible: autoSelectSubtitles.hovered
+                         && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
             }
         }
 
@@ -128,7 +130,9 @@ SettingsBasePage {
 
             ToolTip {
                 text: KI18n.i18nc("@info:tooltip", "When checked the subtitles can be rendered outside the video, in the black borders. Might not work for all .ass subtitles.")
-                visible: allowOnBlackBordersCheckBox.hovered && GeneralSettings.showExplanatoryToolTips
+                delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                visible: allowOnBlackBordersCheckBox.hovered
+                         && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
             }
         }
 
@@ -177,7 +181,9 @@ SettingsBasePage {
 
                 ToolTip {
                     text: KI18n.i18nc("@info:tooltip", "Reset to default value")
-                    visible: resetSubtitleFontButton.hovered && GeneralSettings.showExplanatoryToolTips
+                    delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                    visible: resetSubtitleFontButton.hovered
+                             && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                 }
             }
         }
@@ -276,7 +282,9 @@ SettingsBasePage {
 
                 ToolTip {
                     text: KI18n.i18nc("@info:tooltip", "Reset to default value")
-                    visible: resetSubtitleColorButton.hovered && GeneralSettings.showExplanatoryToolTips
+                    delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                    visible: resetSubtitleColorButton.hovered
+                             && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                 }
             }
         }
@@ -334,7 +342,9 @@ SettingsBasePage {
 
                 ToolTip {
                     text: KI18n.i18nc("@info:tooltip", "Reset to default value")
-                    visible: resetShadowColorButton.hovered && GeneralSettings.showExplanatoryToolTips
+                    delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                    visible: resetShadowColorButton.hovered
+                             && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                 }
             }
         }
@@ -358,7 +368,9 @@ SettingsBasePage {
 
             ToolTip {
                 text: KI18n.i18nc("@info:tooltip", "Set to 0 (zero) to disable.")
-                visible: shadowOffsetSpinBox.hovered && GeneralSettings.showExplanatoryToolTips
+                delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                visible: shadowOffsetSpinBox.hovered
+                         && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
             }
         }
 
@@ -415,7 +427,9 @@ SettingsBasePage {
 
                 ToolTip {
                     text: KI18n.i18nc("@info:tooltip", "Reset to default value")
-                    visible: resetBorderColorButton.hovered && GeneralSettings.showExplanatoryToolTips
+                    delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                    visible: resetBorderColorButton.hovered
+                             && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                 }
             }
         }
@@ -439,7 +453,9 @@ SettingsBasePage {
 
             ToolTip {
                 text: KI18n.i18nc("@info:tooltip", "Set to 0 (zero) to disable.")
-                visible: borderSizeSpinBox.hovered && GeneralSettings.showExplanatoryToolTips
+                delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                visible: borderSizeSpinBox.hovered
+                         && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
             }
         }
 
diff --git a/src/qml/Settings/VideoSettings.qml b/src/qml/Settings/VideoSettings.qml
index 21cc82d3..29f99839 100644
--- a/src/qml/Settings/VideoSettings.qml
+++ b/src/qml/Settings/VideoSettings.qml
@@ -51,7 +51,9 @@ SettingsBasePage {
                     text: KI18n.i18nc("@info:tooltip", "Used for music files that don’t have a video track, "
                                 + "an embedded cover image or a cover/folder image "
                                 + "in the same folder as the played file.")
-                    visible: defaultCover.hovered && GeneralSettings.showExplanatoryToolTips
+                    delay: HarunaApp.isAltKeyPressed ? 0 : Kirigami.Units.toolTipDelay
+                    visible: defaultCover.hovered
+                             && (GeneralSettings.showExplanatoryToolTips || HarunaApp.isAltKeyPressed)
                 }
 
                 function save() : void {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.