[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: make header color transparent by default in `TableViewExt`

Steve Lhomme (@robUx4) gitlab at videolan.org
Sun Mar 16 12:15:28 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b898bd73 by Fatih Uzunoglu at 2025-03-16T11:50:50+00:00
qml: make header color transparent by default in `TableViewExt`

Having a header color by default does not make sense here:
- There is header background color but not background color for the rest.
- Views are not controls, and are often placed within controls where
background is handled properly.
- A purely transparent rectangle does not create a scene graph node thus
not rendered. This is considered an optimization for rendering. In this
case, since the background is likely to be the same as the background
color of the parent control, the area is painted twice with the same
color. If the color needs to be different, the property can be overridden
to deviate from transparent color.

- - - - -
567be206 by Fatih Uzunoglu at 2025-03-16T11:50:50+00:00
qml: do not set `headerColor` in `MusicAlbumsGridExpandDelegate`

The background color is the same as header color, there is no
need to have extra coloring in the header.

- - - - -


2 changed files:

- modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
- modules/gui/qt/widgets/qml/TableViewExt.qml


Changes:

=====================================
modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
=====================================
@@ -77,6 +77,8 @@ FocusScope {
     }
 
     Rectangle {
+        id: background
+
         anchors.fill: parent
         color: theme.bg.secondary
 
@@ -418,10 +420,7 @@ FocusScope {
                 }
             }]
 
-
-            headerColor: theme.bg.secondary
-
-            fadingEdge.backgroundColor: headerColor
+            fadingEdge.backgroundColor: background.color
 
             header: Loader {
                 sourceComponent: VLCStyle.isScreenSmall


=====================================
modules/gui/qt/widgets/qml/TableViewExt.qml
=====================================
@@ -112,7 +112,7 @@ FocusScope {
 
     property Component header: null
     property Item headerItem: view.headerItem?.loadedHeader ?? null
-    property color headerColor: colorContext.bg.primary
+    property color headerColor: "transparent"
     property int headerTopPadding: 0
 
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8e2b2ac60a0a5a5653e780034ca34683492b72d3...567be20648eda24b09805984020fcd929bb8f104

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8e2b2ac60a0a5a5653e780034ca34683492b72d3...567be20648eda24b09805984020fcd929bb8f104
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