[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt: fix sub-pixel font rendering when applicable in FadingEdgeListView
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Nov 7 17:20:27 UTC 2022
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
663fbb19 by Fatih Uzunoglu at 2022-11-07T16:38:42+00:00
qt: fix sub-pixel font rendering when applicable in FadingEdgeListView
... by introducing backgroundColor property
- - - - -
031bb0f1 by Fatih Uzunoglu at 2022-11-07T16:38:42+00:00
qt: do not use RGBA format unnecessarily in FadingEdgeListView
- - - - -
7 changed files:
- modules/gui/qt/maininterface/qml/MainTableView.qml
- modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
- modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
- modules/gui/qt/medialibrary/qml/VideoDisplayRecentVideos.qml
- modules/gui/qt/playlist/qml/PlaylistListView.qml
- modules/gui/qt/widgets/qml/FadingEdgeListView.qml
- modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
Changes:
=====================================
modules/gui/qt/maininterface/qml/MainTableView.qml
=====================================
@@ -19,9 +19,12 @@
import QtQuick 2.11
import "qrc:///widgets/" as Widgets
+import "qrc:///style/"
Widgets.KeyNavigableTableView {
id: root
displayMarginEnd: g_mainDisplay.displayMargin
+
+ backgroundColor: VLCStyle.colors.bg
}
=====================================
modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
=====================================
@@ -172,6 +172,8 @@ FocusScope {
MusicTrackListDisplay {
id: tracks
+ backgroundColor: VLCStyle.colors.expandDelegate
+
readonly property int _nbCols: VLCStyle.gridColumnsForWidth(tracks.availableRowWidth)
property Component titleDelegate: RowLayout {
=====================================
modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
=====================================
@@ -53,6 +53,8 @@ FocusScope {
// To get blur effect while scrolling in mainview
displayMarginEnd: g_mainDisplay.displayMargin
+
+ backgroundColor: VLCStyle.colors.bg
}
EmptyLabelButton {
=====================================
modules/gui/qt/medialibrary/qml/VideoDisplayRecentVideos.qml
=====================================
@@ -95,6 +95,8 @@ FocusScope {
focus: true
+ backgroundColor: VLCStyle.colors.bg
+
Navigation.parentItem: root
visible: listView.count > 0
=====================================
modules/gui/qt/playlist/qml/PlaylistListView.qml
=====================================
@@ -283,6 +283,9 @@ Control {
dragAutoScrollDragItem: dragItem
+ backgroundColor: background.usingAcrylic ? "transparent"
+ : background.alternativeColor
+
property int shiftIndex: -1
property Item itemContainsDrag: null
=====================================
modules/gui/qt/widgets/qml/FadingEdgeListView.qml
=====================================
@@ -25,6 +25,29 @@ import "qrc:///util/Helpers.js" as Helpers
ListView {
id: root
+ // backgroundColor is only needed for sub-pixel
+ // font rendering. Or, if the background color
+ // needs to be known during rendering in general.
+ // Ideally it should be fully opaque, but it is
+ // still better than not providing any color
+ // information.
+ property alias backgroundColor: contentItemCoverRect.color
+
+ Rectangle {
+ id: contentItemCoverRect
+
+ parent: root.contentItem
+
+ x: contentX
+ y: contentY
+
+ implicitWidth: proxyContentItem.width
+ implicitHeight: proxyContentItem.height
+
+ z: -99
+ visible: proxyContentItem.visible && color.a > 0.0
+ }
+
property bool disableBeginningFade: false
property bool disableEndFade: false
@@ -156,6 +179,12 @@ ListView {
smooth: false
+ // If background rectangle is fully opaque,
+ // the texture does not need an alpha
+ // channel: (optimization)
+ format: (contentItemCoverRect.visible && Helpers.compareFloat(1.0, contentItemCoverRect.color.a)) ? ShaderEffectSource.RGB
+ : ShaderEffectSource.RGBA
+
layer.enabled: true
layer.effect: ShaderEffect {
// It makes sense to use the effect for only in the fading part.
=====================================
modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
=====================================
@@ -97,6 +97,7 @@ FocusScope {
property alias footerItem: view.footerItem
property alias footer: view.footer
+ property alias backgroundColor: view.backgroundColor
property alias fadeSize: view.fadeSize
property alias add: view.add
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/24294e0c2954483948197bad66fc9a079a9a470b...031bb0f15926e6c3c634e45e5b52df137778feee
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/24294e0c2954483948197bad66fc9a079a9a470b...031bb0f15926e6c3c634e45e5b52df137778feee
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