[vlc-commits] [Git][videolan/vlc][master] 7 commits: qml: fix artwork info widget focus border color

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Jul 4 20:14:05 UTC 2021



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
674d9fc2 by Fatih Uzunoglu at 2021-07-04T19:54:51+00:00
qml: fix artwork info widget focus border color

- - - - -
c82e7fb3 by Fatih Uzunoglu at 2021-07-04T19:54:51+00:00
qml: artwork info control disable spacing when not needed

- - - - -
bb5f3d04 by Fatih Uzunoglu at 2021-07-04T19:54:51+00:00
qml: use binding for AnimatedBackground border width

this fixes the border width not scaled when interface
scale factor is changed and when the item is focused.

- - - - -
edc645d3 by Fatih Uzunoglu at 2021-07-04T19:54:51+00:00
qml: give space for artwork info widget border width

- - - - -
36c46548 by Fatih Uzunoglu at 2021-07-04T19:54:51+00:00
qml: hide artwork info tooltip when control is hidden

- - - - -
5085485d by Fatih Uzunoglu at 2021-07-04T19:54:51+00:00
qml: fix artwork info tooltip positioning

- - - - -
ee53dc56 by Fatih Uzunoglu at 2021-07-04T19:54:51+00:00
qml: show progress in artwork info tooltip

- - - - -


2 changed files:

- modules/gui/qt/player/qml/ControlButtons.qml
- modules/gui/qt/widgets/qml/AnimatedBackground.qml


Changes:

=====================================
modules/gui/qt/player/qml/ControlButtons.qml
=====================================
@@ -815,12 +815,13 @@ Item{
 
             property VLCColors colors: VLCStyle.colors
 
-            readonly property real minimumWidth: cover.width
+            readonly property real minimumWidth: cover.width + VLCStyle.focus_border * 2
             property real extraWidth: 0
 
-            width: playingItemInfoRow.width
-            implicitWidth: playingItemInfoRow.implicitWidth
-            implicitHeight: playingItemInfoRow.implicitHeight
+            implicitWidth: playingItemInfoRow.width + VLCStyle.focus_border * 2
+            implicitHeight: playingItemInfoRow.height + VLCStyle.focus_border * 2
+
+            activeBorderColor: colors.bgFocus
 
             Keys.onPressed: {
                 if (KeyHelper.matchOk(event) ) {
@@ -843,9 +844,12 @@ Item{
 
             Row {
                 id: playingItemInfoRow
+
+                anchors.centerIn: parent
+
                 width: (coverItem.width + infoColumn.width + spacing)
 
-                spacing: VLCStyle.margin_xsmall
+                spacing: infoColumn.visible ? VLCStyle.margin_xsmall : 0
 
                 Item {
                     id: coverItem
@@ -883,6 +887,24 @@ Item{
 
                         width: VLCStyle.dp(60)
                         height: VLCStyle.dp(60)
+
+                        ToolTip {
+                            x: parent.x
+
+                            visible: artworkInfoItem.visible
+                                     && (titleLabel.implicitWidth > titleLabel.width || artistLabel.implicitWidth > titleLabel.width)
+                                     && (artworkInfoMouseArea.containsMouse || artworkInfoItem.active)
+                            delay: 500
+
+                            contentItem: Text {
+                                text: i18n.qtr("%1\n%2\n%3").arg(titleLabel.text).arg(artistLabel.text).arg(progressIndicator.text)
+                                color: colors.tooltipTextColor
+                            }
+
+                            background: Rectangle {
+                                color: colors.tooltipColor
+                            }
+                        }
                     }
                 }
 
@@ -896,22 +918,6 @@ Item{
 
                     visible: width > 0
 
-                    ToolTip {
-                        text: i18n.qtr("%1\n%2").arg(titleLabel.text).arg(artistLabel.text)
-                        visible: (titleLabel.implicitWidth > titleLabel.width || artistLabel.implicitWidth > titleLabel.width)
-                                 && (artworkInfoMouseArea.containsMouse || artworkInfoItem.active)
-                        delay: 500
-
-                        contentItem: Text {
-                                  text: i18n.qtr("%1\n%2").arg(titleLabel.text).arg(artistLabel.text)
-                                  color: colors.tooltipTextColor
-                        }
-
-                        background: Rectangle {
-                            color: colors.tooltipColor
-                        }
-                    }
-
                     Widgets.MenuLabel {
                         id: titleLabel
 


=====================================
modules/gui/qt/widgets/qml/AnimatedBackground.qml
=====================================
@@ -71,7 +71,7 @@ Rectangle {
             onRunningChanged: {
                 root.borderColorAnimationRunning = running
                 if (running && root.active) {
-                    border.width = VLCStyle.focus_border
+                    border.width = Qt.binding(function() { return VLCStyle.focus_border })
                 } else if (!running && !root.active) {
                     border.width = 0
                 }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/24c76d8af25efa5e5f589300adb85cbd479775ea...ee53dc56a2c4fa1982e518870cde3b4e7cc66742

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/24c76d8af25efa5e5f589300adb85cbd479775ea...ee53dc56a2c4fa1982e518870cde3b4e7cc66742
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list