[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: set fading edge background color directly from the background
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu May 30 17:32:03 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
36f4834b by Fatih Uzunoglu at 2024-05-30T16:59:56+00:00
qml: set fading edge background color directly from the background
- - - - -
cfd0fbf5 by Fatih Uzunoglu at 2024-05-30T16:59:56+00:00
qml: remove unnecessary Rectangle in player play queue background
- - - - -
2 changed files:
- modules/gui/qt/player/qml/Player.qml
- modules/gui/qt/playlist/qml/PlaylistListView.qml
Changes:
=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -595,88 +595,85 @@ FocusScope {
value: playlistVisibility.isPlaylistVisible ? "visible" : "hidden"
}
- component: Rectangle {
+ component: PL.PlaylistListView {
+ id: playlistView
+
width: Helpers.clamp(rootPlayer.width / resizeHandle.widthFactor
, playlistView.minimumWidth
, (rootPlayer.width + playlistView.rightPadding) / 2)
-
height: playlistpopup.height
- color: windowTheme.bg.primary.alpha(0.8)
-
+ useAcrylic: false
+ focus: true
- PL.PlaylistListView {
- id: playlistView
+ wheelEnabled: true
- useAcrylic: false
- focus: true
-
- wheelEnabled: true
+ rightPadding: VLCStyle.applicationHorizontalMargin
+ topPadding: {
+ if (rootPlayer._controlsUnderVideo)
+ return VLCStyle.margin_normal
+ else
+ // NOTE: We increase the padding accordingly to avoid overlapping the TopBar.
+ return topBar.reservedHeight
+ }
- anchors.fill: parent
- rightPadding: VLCStyle.applicationHorizontalMargin
- topPadding: {
- if (rootPlayer._controlsUnderVideo)
- return VLCStyle.margin_normal
- else
- // NOTE: We increase the padding accordingly to avoid overlapping the TopBar.
- return topBar.reservedHeight
- }
+ background: Rectangle {
+ color: windowTheme.bg.primary.alpha(0.8)
+ }
- Navigation.parentItem: rootPlayer
- Navigation.upItem: topBar
- Navigation.downItem: Player.isInteractive ? toggleControlBarButton : controlBar
- Navigation.leftAction: closePlaylist
- Navigation.cancelAction: closePlaylist
-
- function closePlaylist() {
- playlistVisibility.togglePlaylistVisibility()
- if (audioControls.visible)
- audioControls.forceActiveFocus()
- else
- controlBar.forceActiveFocus()
- }
+ Navigation.parentItem: rootPlayer
+ Navigation.upItem: topBar
+ Navigation.downItem: Player.isInteractive ? toggleControlBarButton : controlBar
+ Navigation.leftAction: closePlaylist
+ Navigation.cancelAction: closePlaylist
+
+ function closePlaylist() {
+ playlistVisibility.togglePlaylistVisibility()
+ if (audioControls.visible)
+ audioControls.forceActiveFocus()
+ else
+ controlBar.forceActiveFocus()
+ }
- Widgets.HorizontalResizeHandle {
- id: resizeHandle
+ Widgets.HorizontalResizeHandle {
+ id: resizeHandle
- property bool _inhibitMainCtxUpdate: false
+ property bool _inhibitMainCtxUpdate: false
- parent: playlistView
+ parent: playlistView
- anchors {
- top: parent.top
- bottom: parent.bottom
- left: parent.left
- }
+ anchors {
+ top: parent.top
+ bottom: parent.bottom
+ left: parent.left
+ }
- atRight: false
- targetWidth: playlistpopup.width
- sourceWidth: rootPlayer.width
+ atRight: false
+ targetWidth: playlistpopup.width
+ sourceWidth: rootPlayer.width
- onWidthFactorChanged: {
- if (!_inhibitMainCtxUpdate)
- MainCtx.playerPlaylistWidthFactor = widthFactor
- }
+ onWidthFactorChanged: {
+ if (!_inhibitMainCtxUpdate)
+ MainCtx.playerPlaylistWidthFactor = widthFactor
+ }
- Component.onCompleted: _updateFromMainCtx()
+ Component.onCompleted: _updateFromMainCtx()
- function _updateFromMainCtx() {
- if (widthFactor == MainCtx.playerPlaylistWidthFactor)
- return
+ function _updateFromMainCtx() {
+ if (widthFactor == MainCtx.playerPlaylistWidthFactor)
+ return
- _inhibitMainCtxUpdate = true
- widthFactor = MainCtx.playerPlaylistWidthFactor
- _inhibitMainCtxUpdate = false
- }
+ _inhibitMainCtxUpdate = true
+ widthFactor = MainCtx.playerPlaylistWidthFactor
+ _inhibitMainCtxUpdate = false
+ }
- Connections {
- target: MainCtx
+ Connections {
+ target: MainCtx
- function onPlaylistWidthFactorChanged() {
- resizeHandle._updateFromMainCtx()
- }
+ function onPlaylistWidthFactorChanged() {
+ resizeHandle._updateFromMainCtx()
}
}
}
=====================================
modules/gui/qt/playlist/qml/PlaylistListView.qml
=====================================
@@ -264,7 +264,7 @@ T.Pane {
}
fadingEdge.backgroundColor: root.background.usingAcrylic ? "transparent"
- : listView.colorContext.bg.primary
+ : (root.background?.color ?? "transparent")
contentWidth: width
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5e2724f55ca7684b5c60020f94978968792db430...cfd0fbf58a12cd09fd16929c7f2072c9f2d0a30f
--
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5e2724f55ca7684b5c60020f94978968792db430...cfd0fbf58a12cd09fd16929c7f2072c9f2d0a30f
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