[vlc-commits] [Git][videolan/vlc][master] 3 commits: qml: introduce properties `textStyle` and `textStyleColor` in `IconButton.qml`

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Apr 30 15:16:52 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
35de62bd by Fatih Uzunoglu at 2026-04-30T14:18:08+00:00
qml: introduce properties `textStyle` and `textStyleColor` in `IconButton.qml`

- - - - -
7f8aa396 by Fatih Uzunoglu at 2026-04-30T14:18:08+00:00
qml: provide outline for the text in buttons of `PIPPlayer`

Although a rectangle with color `#10000000` is used, it
does not seem enough for accessibility. If the video is
too bright, it becomes harder to locate the buttons.

- - - - -
39fbbb48 by Fatih Uzunoglu at 2026-04-30T14:18:08+00:00
qml: get rid of the extra rectangle in `PIPPlayer.qml`

We have to use `renderingEnabled` here, so we can just
adjust the color instead of having an additional rectangle.

- - - - -


2 changed files:

- modules/gui/qt/player/qml/PIPPlayer.qml
- modules/gui/qt/widgets/qml/IconButton.qml


Changes:

=====================================
modules/gui/qt/player/qml/PIPPlayer.qml
=====================================
@@ -37,6 +37,8 @@ T.Control {
     property real dragYMin: undefined
     property real dragYMax: undefined
 
+    property int textStyle: Text.Outline
+
     Accessible.role: Accessible.Graphic
     Accessible.focusable: false
     Accessible.name: qsTr("video content")
@@ -96,6 +98,11 @@ T.Control {
         id: videoSurface
         videoSurfaceProvider: MainCtx.videoSurfaceProvider
 
+        color: (hoverHandler.hovered ||
+                playButton?.hovered ||
+                closeButton?.hovered ||
+                fullscreenButton?.hovered) ? "#10000000" : "transparent"
+
         // It is acceptable for effects to exceed the boundaries of the
         // parent. They are an exception to the "hypothetical clip test".
         Widgets.DefaultShadow {
@@ -103,8 +110,7 @@ T.Control {
         }
     }
 
-    contentItem: Rectangle {
-        color: "#10000000"
+    contentItem: Item {
         visible: hoverHandler.hovered ||
                  playButton.hovered ||
                  closeButton.hovered ||
@@ -129,6 +135,8 @@ T.Control {
                   ? VLCIcons.pause_filled
                   : VLCIcons.play_filled
 
+            textStyle: root.textStyle
+
             onClicked: MainPlaylistController.togglePlayPause()
         }
 
@@ -146,6 +154,8 @@ T.Control {
             description: qsTr("close video")
             text: VLCIcons.close
 
+            textStyle: root.textStyle
+
             onClicked: MainPlaylistController.stop()
         }
 
@@ -164,6 +174,8 @@ T.Control {
             description: qsTr("maximize player")
             text: VLCIcons.fullscreen
 
+            textStyle: root.textStyle
+
             onClicked: MainCtx.requestShowPlayerView()
         }
     }


=====================================
modules/gui/qt/widgets/qml/IconButton.qml
=====================================
@@ -30,6 +30,9 @@ T.Button {
     property color color: "white"
     property string description
 
+    property int textStyle: Text.Normal
+    property color textStyleColor: "black"
+
     implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
                             implicitContentWidth + leftPadding + rightPadding)
     implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
@@ -53,6 +56,8 @@ T.Button {
         font: control.font
         color: control.color
         text: control.text
+        style: control.textStyle
+        styleColor: control.textStyleColor
     }
 
     background: Item {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/68bb4936aba0975ec076f4a49b2989b5177ea464...39fbbb485db6efd14bcdf70c31d753fdd168e340

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/68bb4936aba0975ec076f4a49b2989b5177ea464...39fbbb485db6efd14bcdf70c31d753fdd168e340
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list