[vlc-commits] [Git][videolan/vlc][master] 3 commits: qml: inline default shadow color
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Feb 10 09:42:24 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
579000d1 by Pierre Lamot at 2023-02-10T09:23:56+00:00
qml: inline default shadow color
- - - - -
d32a4280 by Pierre Lamot at 2023-02-10T09:23:56+00:00
qml: use DoubleShadow in DragItem
- - - - -
98266d39 by Pierre Lamot at 2023-02-10T09:23:56+00:00
qml: unify CoverShadow API with DoubleShadow
- - - - -
8 changed files:
- modules/gui/qt/player/qml/Player.qml
- modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
- modules/gui/qt/playlist/qml/PlaylistDelegate.qml
- modules/gui/qt/widgets/qml/CoverShadow.qml
- modules/gui/qt/widgets/qml/DoubleShadow.qml
- modules/gui/qt/widgets/qml/DragItem.qml
- modules/gui/qt/widgets/qml/GridItem.qml
- modules/gui/qt/widgets/qml/ListCoverShadow.qml
Changes:
=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -415,13 +415,15 @@ FocusScope {
}
}
+ //don't use a DoubleShadow here as cover size will change
+ //dynamically with the window size
Widgets.CoverShadow {
anchors.fill: parent
source: cover
primaryVerticalOffset: VLCStyle.dp(24)
- primaryRadius: VLCStyle.dp(54)
+ primaryBlurRadius: VLCStyle.dp(54)
secondaryVerticalOffset: VLCStyle.dp(5)
- secondaryRadius: VLCStyle.dp(14)
+ secondaryBlurRadius: VLCStyle.dp(14)
}
}
=====================================
modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
=====================================
@@ -88,11 +88,9 @@ AbstractButton {
anchors.fill: parent
primaryBlurRadius: VLCStyle.dp(3, VLCStyle.scale)
- primaryColor: Qt.rgba(0, 0, 0, 0.18)
primaryVerticalOffset: VLCStyle.dp(1, VLCStyle.scale)
secondaryBlurRadius: VLCStyle.dp(14, VLCStyle.scale)
- secondaryColor: Qt.rgba(0, 0, 0, 0.22)
secondaryVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
}
=====================================
modules/gui/qt/playlist/qml/PlaylistDelegate.qml
=====================================
@@ -135,11 +135,9 @@ T.Control {
z: -1
primaryBlurRadius: VLCStyle.dp(3)
- primaryColor: Qt.rgba(0, 0, 0, 0.18)
primaryVerticalOffset: VLCStyle.dp(1)
secondaryBlurRadius: VLCStyle.dp(14)
- secondaryColor: Qt.rgba(0, 0, 0, 0.22)
secondaryVerticalOffset: VLCStyle.dp(6)
}
}
=====================================
modules/gui/qt/widgets/qml/CoverShadow.qml
=====================================
@@ -26,11 +26,17 @@ Item {
property alias cached: primaryShadow.cached
property alias source: primaryShadow.source
+
+ property alias primaryColor: primaryShadow.color
property alias primaryVerticalOffset: primaryShadow.verticalOffset
- property alias primaryRadius: primaryShadow.radius
+ property alias primaryHorizontalOffset: primaryShadow.horizontalOffset
+ property alias primaryBlurRadius: primaryShadow.radius
property alias primarySamples: primaryShadow.samples
+
+ property alias secondaryColor: secondaryShadow.color
property alias secondaryVerticalOffset: secondaryShadow.verticalOffset
- property alias secondaryRadius: secondaryShadow.radius
+ property alias secondaryHorizontalOffset: secondaryShadow.horizontalOffset
+ property alias secondaryBlurRadius: secondaryShadow.radius
property alias secondarySamples: secondaryShadow.samples
DropShadow {
=====================================
modules/gui/qt/widgets/qml/DoubleShadow.qml
=====================================
@@ -51,7 +51,7 @@ Item {
anchors.centerIn: parent
- color: VLCStyle.colors.bg
+ color: Qt.rgba(0, 0, 0, .18)
xOffset: 0
xRadius: root.xRadius
@@ -65,7 +65,7 @@ Item {
anchors.centerIn: parent
- color: VLCStyle.colors.bg
+ color: Qt.rgba(0, 0, 0, .22)
xOffset: 0
xRadius: root.xRadius
=====================================
modules/gui/qt/widgets/qml/DragItem.qml
=====================================
@@ -192,6 +192,7 @@ Item {
glowRadius: VLCStyle.dp(8, VLCStyle.scale)
color: colors.glowColor
spread: 0.2
+ z: -1
}
Repeater {
@@ -211,28 +212,26 @@ Item {
radius: coverRepeater.count > 1 ? dragItem.coverSize : VLCStyle.dp(2, VLCStyle.scale)
anchors.fill: parent
color: colors.bg
- }
- DropShadow {
- horizontalOffset: 0
- verticalOffset: VLCStyle.dp(1, VLCStyle.scale)
- radius: VLCStyle.dp(3, VLCStyle.scale)
- samples: 2 * radius + 1
- color: Qt.rgba(0, 0, 0, .18)
- anchors.fill: bg
- source: bg
- }
+ DoubleShadow {
+ anchors.fill: parent
+
+ z: -1
- DropShadow {
- horizontalOffset: 0
- verticalOffset: VLCStyle.dp(6, VLCStyle.scale)
- radius: VLCStyle.dp(14, VLCStyle.scale)
- samples: 2 * radius + 1
- color: Qt.rgba(0, 0, 0, .18)
- anchors.fill: bg
- source: bg
+ xRadius: bg.radius
+ yRadius: bg.radius
+
+ primaryBlurRadius: VLCStyle.dp(3)
+ primaryVerticalOffset: VLCStyle.dp(1, VLCStyle.scale)
+ primaryHorizontalOffset: 0
+
+ secondaryBlurRadius: VLCStyle.dp(14)
+ secondaryVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
+ secondaryHorizontalOffset: 0
+ }
}
+
Loader {
// parent may provide extra data with covers
property var model: modelData
@@ -284,30 +283,24 @@ Item {
color: colors.accent
text: "+" + (dragItem._indexesSize - dragItem._maxCovers)
}
- }
- DropShadow {
- horizontalOffset: 0
- verticalOffset: VLCStyle.dp(1, VLCStyle.scale)
- radius: VLCStyle.dp(3, VLCStyle.scale)
- samples: 2 * radius + 1
- color: Qt.rgba(0, 0, 0, .18)
- anchors.fill: extraCovers
- source: extraCovers
- visible: extraCovers.visible
- }
+ DoubleShadow {
+ z: -1
+ anchors.fill: parent
+ xRadius: extraCovers.radius
+ yRadius: extraCovers.radius
- DropShadow {
- horizontalOffset: 0
- verticalOffset: VLCStyle.dp(6, VLCStyle.scale)
- radius: VLCStyle.dp(14, VLCStyle.scale)
- samples: 2 * radius + 1
- color: Qt.rgba(0, 0, 0, .18)
- anchors.fill: extraCovers
- source: extraCovers
- visible: extraCovers.visible
+ primaryBlurRadius: VLCStyle.dp(3)
+ primaryVerticalOffset: VLCStyle.dp(1, VLCStyle.scale)
+ primaryHorizontalOffset: 0
+
+ secondaryBlurRadius: VLCStyle.dp(14)
+ secondaryVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
+ secondaryHorizontalOffset: 0
+ }
}
+
Column {
id: labelColumn
=====================================
modules/gui/qt/widgets/qml/GridItem.qml
=====================================
@@ -262,11 +262,9 @@ T.Control {
xRadius: parent.radius
yRadius: parent.radius
- primaryColor: Qt.rgba(0, 0, 0, .18)
primaryVerticalOffset: VLCStyle.dp(1, VLCStyle.scale)
primaryBlurRadius: VLCStyle.dp(3, VLCStyle.scale)
- secondaryColor: Qt.rgba(0, 0, 0, .22)
secondaryVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
secondaryBlurRadius: VLCStyle.dp(14, VLCStyle.scale)
}
@@ -284,11 +282,9 @@ T.Control {
xRadius: parent.radius
yRadius: parent.radius
- primaryColor: Qt.rgba(0, 0, 0, .18)
primaryVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
primaryBlurRadius: VLCStyle.dp(18, VLCStyle.scale)
- secondaryColor: Qt.rgba(0, 0, 0, .22)
secondaryVerticalOffset: VLCStyle.dp(32, VLCStyle.scale)
secondaryBlurRadius: VLCStyle.dp(72, VLCStyle.scale)
}
=====================================
modules/gui/qt/widgets/qml/ListCoverShadow.qml
=====================================
@@ -26,11 +26,9 @@ DoubleShadow {
primaryVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
primaryBlurRadius: VLCStyle.dp(14, VLCStyle.scale)
- primaryColor: Qt.rgba(0, 0, 0, .22)
secondaryVerticalOffset: VLCStyle.dp(1, VLCStyle.scale)
secondaryBlurRadius: VLCStyle.dp(3, VLCStyle.scale)
- secondaryColor: Qt.rgba(0, 0, 0, .18)
z: -1
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4fdd351c85ed9caf10c15b21ad9fd33c7d24441d...98266d395488590927f66e397de1cbdd11e2b1ad
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4fdd351c85ed9caf10c15b21ad9fd33c7d24441d...98266d395488590927f66e397de1cbdd11e2b1ad
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