[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: fix record button text/description

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Tue Apr 30 05:40:12 UTC 2024



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


Commits:
1eb85220 by Pierre Lamot at 2024-04-30T05:07:25+00:00
qml: fix record button text/description

property requirement of IconToolButton changed since d6b6ac32c25c561bab27c7775659cba2ac31a570

- - - - -
c1d4b32c by Pierre Lamot at 2024-04-30T05:07:25+00:00
qml: update RecordButton animation

* contentitem implementation aligns with IconToolButton
* animation fades to transparent red rather than transparent black
* animation will fade in then fade out

- - - - -


1 changed file:

- modules/gui/qt/player/qml/controlbarcontrols/RecordButton.qml


Changes:

=====================================
modules/gui/qt/player/qml/controlbarcontrols/RecordButton.qml
=====================================
@@ -29,34 +29,44 @@ Widgets.IconToolButton {
 
     enabled: !paintOnly && Player.isPlaying
 
-    color: "red" //red means recording
-    text: qsTr("record")
+    color: "#FFFF0000" //red means recording
+    text: VLCIcons.record
+    description: qsTr("record")
 
     onClicked: Player.toggleRecord()
 
-    contentItem: T.Label {
-        anchors.centerIn: parent
+    //IconToolButton already contains a color animation that would conflict
+    contentItem: Widgets.IconLabel {
+        text: control.text
 
-        verticalAlignment: Text.AlignVCenter
-        horizontalAlignment: Text.AlignHCenter
-
-        text: VLCIcons.record
         color: control.color
 
-        ColorAnimation on color {
-            from:  "transparent"
-            to: control.color
-            //this is an animation and not a transisition, we explicitly want a long duration
-            duration: 1000
+        SequentialAnimation on color {
             loops: Animation.Infinite
-            easing.type: Easing.InOutSine
             running: control.enabled && Player.recording
 
+            ColorAnimation  {
+                from:  "#FFFF0000"
+                to: "#00FF0000"//use "red" transparent
+                //this is an animation and not a transisition, we explicitly want a long duration
+                duration: 1000
+                easing.type: Easing.InSine
+            }
+
+            ColorAnimation  {
+                from:"#00FF0000"
+                to: "#FFFF0000"
+                //this is an animation and not a transisition, we explicitly want a long duration
+                duration: 1000
+                easing.type: Easing.OutSine
+            }
+
             onStopped: {
-                control.contentItem.color = control.color
+                color = "#FFFF0000"
             }
         }
-
-        Accessible.ignored: true
+        font: control.font
     }
+
+
 }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a09caaa34c18d7b69cfca7759c4a39e2d0cd4b4f...c1d4b32cb7380df649827884e31f89ee6719efb4

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a09caaa34c18d7b69cfca7759c4a39e2d0cd4b4f...c1d4b32cb7380df649827884e31f89ee6719efb4
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