[vlc-commits] [Git][videolan/vlc][master] 3 commits: qml: do not use tool tip in TextAutoScroller
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sun Jun 23 13:18:23 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
ecde657c by Fatih Uzunoglu at 2024-06-23T12:57:31+00:00
qml: do not use tool tip in TextAutoScroller
Label by default should show the tool tip itself.
- - - - -
611d55b9 by Fatih Uzunoglu at 2024-06-23T12:57:31+00:00
qml: do not scroll text when hovered in TextAutoScroller
- - - - -
0a474122 by Fatih Uzunoglu at 2024-06-23T12:57:31+00:00
qml: use `visualFocus` instead of `activeFocus` for auto text scrolling
- - - - -
3 changed files:
- modules/gui/qt/medialibrary/qml/MusicArtistDelegate.qml
- modules/gui/qt/widgets/qml/TableViewDelegate.qml
- modules/gui/qt/widgets/qml/TextAutoScroller.qml
Changes:
=====================================
modules/gui/qt/medialibrary/qml/MusicArtistDelegate.qml
=====================================
@@ -169,7 +169,7 @@ T.ItemDelegate {
Widgets.TextAutoScroller {
label: artistName
- forceScroll: root.isCurrent || root._isHover
+ forceScroll: root.isCurrent || root.visualFocus
clip: scrolling
implicitHeight: artistName.implicitHeight
=====================================
modules/gui/qt/widgets/qml/TableViewDelegate.qml
=====================================
@@ -188,7 +188,7 @@ T.Control {
rowModel: Qt.binding(() => delegate.rowModel),
colModel: Qt.binding(() => loader.modelData.model),
index: Qt.binding(() => delegate.index),
- currentlyFocused: Qt.binding(() => delegate.activeFocus),
+ currentlyFocused: Qt.binding(() => delegate.visualFocus),
selected: Qt.binding(() => delegate.selected),
containsMouse: Qt.binding(() => hoverArea.containsMouse),
colorContext: Qt.binding(() => theme),
=====================================
modules/gui/qt/widgets/qml/TextAutoScroller.qml
=====================================
@@ -28,16 +28,11 @@ Item {
// `label`: label to scroll, don't add horizontal anchors on it
property Text label: undefined
property bool forceScroll: false
- property alias hoverScroll: hoverArea.enabled
readonly property real requiredTextWidth: label.implicitWidth
readonly property bool _needsToScroll: (label.width < requiredTextWidth)
- ToolTip.delay: VLCStyle.delayToolTipAppear
- ToolTip.visible: scrolling && hoverArea.containsMouse
- ToolTip.text: label.text
-
//Accessible
Accessible.role: Accessible.StaticText
Accessible.name: label.text
@@ -52,19 +47,10 @@ Item {
label.Accessible.ignored = true
}
- MouseArea {
- id: hoverArea
-
- anchors.fill: parent
- acceptedButtons: Qt.NoButton
- cursorShape: undefined
- hoverEnabled: true
- }
-
SequentialAnimation {
id: scrollAnimation
- running: (root.forceScroll || hoverArea.containsMouse) && root._needsToScroll
+ running: root.forceScroll && root._needsToScroll
loops: Animation.Infinite
onStopped: {
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8a7e12c178d8d0ec820b841206abe4aab54e2d51...0a4741229914e9b9c2e24755e10f7a860a8ad44a
--
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8a7e12c178d8d0ec820b841206abe4aab54e2d51...0a4741229914e9b9c2e24755e10f7a860a8ad44a
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list