[vlc-commits] qml: use previously refactored components on gridItem.qml
Abel Tesfaye
git at videolan.org
Tue Aug 20 18:21:18 CEST 2019
vlc | branch: master | Abel Tesfaye <Abeltesfaye45 at gmail.com> | Fri Aug 9 17:47:09 2019 +0300| [29571b56095aa081e329257cf00f9625b1fa3e8c] | committer: Jean-Baptiste Kempf
qml: use previously refactored components on gridItem.qml
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=29571b56095aa081e329257cf00f9625b1fa3e8c
---
modules/gui/qt/qml/utils/GridItem.qml | 84 +++--------------------------------
1 file changed, 7 insertions(+), 77 deletions(-)
diff --git a/modules/gui/qt/qml/utils/GridItem.qml b/modules/gui/qt/qml/utils/GridItem.qml
index e8ac3490eb..da354570e9 100644
--- a/modules/gui/qt/qml/utils/GridItem.qml
+++ b/modules/gui/qt/qml/utils/GridItem.qml
@@ -97,22 +97,12 @@ Rectangle {
root.activeFocus)
}
- Image {
+ RoundImage {
id: cover
anchors.fill: parent
anchors.margins: VLCStyle.margin_normal
source: image
- fillMode: Image.PreserveAspectCrop
- sourceSize: Qt.size(width, height)
- layer.enabled: true
- layer.effect: OpacityMask {
- maskSource: Rectangle {
- radius: 3
- width: cover.width
- height: cover.height
- visible: false
- }
- }
+
Behavior on anchors.margins {
SmoothedAnimation {
velocity: 100
@@ -216,8 +206,7 @@ Rectangle {
}
}
}
- ProgressBar {
- id: progressBar
+ VideoProgressBar {
value: root.progress
visible: isVideo
anchors {
@@ -225,53 +214,20 @@ Rectangle {
left: parent.left
right: parent.right
}
- background: Rectangle {
- implicitHeight: 2 * VLCStyle.scale
- color: VLCStyle.colors.text
- }
- contentItem: Item {
- Rectangle {
- width: progressBar.visualPosition * parent.width
- height: parent.height
- color: VLCStyle.colors.accent
- }
- }
}
}
- Button {
+ ContextButton {
id: contextButton
visible: isVideo
anchors {
top: cover.top
right: cover.right
}
- width: VLCStyle.icon_normal
- height: VLCStyle.icon_normal
- text: "\u22ef" //ellipsis icon
- font.pointSize: VLCStyle.fontMetrics_normal
-
- hoverEnabled: true
+ color: "white"
onClicked: root.contextMenuButtonClicked(cover_bg)
- background: Rectangle {
- id: contextButtonRect
- anchors.fill: contextButton
- color: "transparent"
- }
- contentItem: Text {
- id: btnTxt
- text: contextButton.text
- font: contextButton.font
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- // layer.enabled: true
- // layer.effect: DropShadow {
- // color: VLCStyle.colors.text
- // }
- }
}
- Label {
+ VideoQualityLabel {
id: resolutionLabel
visible: root.isVideo
anchors {
@@ -281,22 +237,8 @@ Rectangle {
leftMargin: VLCStyle.margin_xxsmall
}
text: root.resolution
- color: "white"
- bottomPadding: VLCStyle.margin_xxxsmall
- topPadding: VLCStyle.margin_xxxsmall
- leftPadding: VLCStyle.margin_xxxsmall
- rightPadding: VLCStyle.margin_xxxsmall
- font.pixelSize: VLCStyle.fontSize_normal
- background: Rectangle {
- id: resolutionLabelRect
- anchors.fill: resolutionLabel
- color: "black"
- opacity: 0.5
- radius: 3
- }
}
- Label {
- id: audioChannelLabel
+ VideoQualityLabel {
anchors {
top: cover.top
left: resolutionLabel.right
@@ -306,18 +248,6 @@ Rectangle {
visible: channel.length > 0
text: root.channel
color: "limegreen"
- bottomPadding: VLCStyle.margin_xxxsmall
- topPadding: VLCStyle.margin_xxxsmall
- leftPadding: VLCStyle.margin_xxxsmall
- rightPadding: VLCStyle.margin_xxxsmall
- font.pixelSize: VLCStyle.fontSize_normal
- background: Rectangle {
- id: audioChannelLabelRect
- anchors.fill: audioChannelLabel
- color: "black"
- opacity: 0.5
- radius: 3
- }
}
states: [
State {
More information about the vlc-commits
mailing list