[vlc-commits] qml: increase height of background for control views in max player
Prince Gupta
git at videolan.org
Fri Nov 6 16:00:57 CET 2020
vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Tue Oct 20 20:20:27 2020 +0530| [605f6c836dc2eb76eb3b0d7ab50b95fcd8d98e6b] | committer: Pierre Lamot
qml: increase height of background for control views in max player
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=605f6c836dc2eb76eb3b0d7ab50b95fcd8d98e6b
---
modules/gui/qt/player/qml/Player.qml | 42 +++++++++++++++++++++++++++++++-----
modules/gui/qt/player/qml/TopBar.qml | 10 ++-------
2 files changed, 39 insertions(+), 13 deletions(-)
diff --git a/modules/gui/qt/player/qml/Player.qml b/modules/gui/qt/player/qml/Player.qml
index 943a77483a..aac31f639b 100644
--- a/modules/gui/qt/player/qml/Player.qml
+++ b/modules/gui/qt/player/qml/Player.qml
@@ -199,6 +199,42 @@ Widgets.NavigableFocusScope {
}
}
+ /// Backgrounds of topControlbar and controlBar are drawn separately since they outgrow their content
+ /* top control bar background */
+ Widgets.DrawerExt {
+ z: 1
+ edge: Widgets.DrawerExt.Edges.Top
+ state: topcontrolView.state
+ width: parent.width
+ height: VLCStyle.dp(206, VLCStyle.scale)
+ component: Rectangle {
+ width: rootPlayer.width
+ height: VLCStyle.dp(206, VLCStyle.scale)
+ gradient: Gradient {
+ GradientStop { position: 0; color: VLCStyle.colors.setColorAlpha(VLCStyle.colors.playerBg, .8) }
+ GradientStop { position: 1; color: "transparent" }
+ }
+ }
+ }
+
+ /* bottom control bar background */
+ Widgets.DrawerExt {
+ z: 1
+ anchors.bottom: parent.bottom
+ width: parent.width
+ edge: Widgets.DrawerExt.Edges.Bottom
+ state: topcontrolView.state
+ height: VLCStyle.dp(206, VLCStyle.scale)
+ component: Rectangle {
+ width: rootPlayer.width
+ height: VLCStyle.dp(206, VLCStyle.scale)
+ gradient: Gradient {
+ GradientStop { position: 0; color: "transparent" }
+ GradientStop { position: 1; color: VLCStyle.colors.setColorAlpha(VLCStyle.colors.playerBg, .8) }
+ }
+ }
+ }
+
//property alias centralLayout: mainLayout.centralLayout
ColumnLayout {
id: mainLayout
@@ -371,12 +407,8 @@ Widgets.NavigableFocusScope {
state: "visible"
edge: Widgets.DrawerExt.Edges.Bottom
- component: Rectangle {
+ component: Item {
id: controllerBarId
- gradient: Gradient {
- GradientStop { position: 1.0; color: VLCStyle.colors.playerBg }
- GradientStop { position: 0.0; color: "transparent" }
- }
width: controlBarView.width
height: controllerId.implicitHeight + controllerId.anchors.bottomMargin
diff --git a/modules/gui/qt/player/qml/TopBar.qml b/modules/gui/qt/player/qml/TopBar.qml
index b2cd3da1de..1c685ec7e8 100644
--- a/modules/gui/qt/player/qml/TopBar.qml
+++ b/modules/gui/qt/player/qml/TopBar.qml
@@ -43,18 +43,12 @@ Widgets.NavigableFocusScope{
Keys.priority: Keys.AfterItem
Keys.onPressed: defaultKeyAction(event, 0)
- Rectangle{
+ Item {
id : topcontrolContent
- color: VLCStyle.colors.setColorAlpha(VLCStyle.colors.banner, 0.8)
+
anchors.fill: parent
implicitHeight: topcontrollerMouseArea.implicitHeight + topcontrollerMouseArea.anchors.topMargin
- gradient: Gradient {
- GradientStop { position: 0.0; color: VLCStyle.colors.playerBg }
- GradientStop { position: 1.0; color: "transparent" }
- }
-
-
MouseArea {
id: topcontrollerMouseArea
hoverEnabled: true
More information about the vlc-commits
mailing list