[vlc-devel] [PATCH 23/25] qml: remove redundant application margins in subcomponents of TopBar
Prince Gupta
guptaprince8832 at gmail.com
Thu Mar 11 09:16:31 UTC 2021
---
modules/gui/qt/player/qml/Player.qml | 5 ++++-
modules/gui/qt/player/qml/ResumeDialog.qml | 6 ++----
modules/gui/qt/player/qml/TopBar.qml | 5 +----
3 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/modules/gui/qt/player/qml/Player.qml b/modules/gui/qt/player/qml/Player.qml
index 9035c5d62f..e7190fcd34 100644
--- a/modules/gui/qt/player/qml/Player.qml
+++ b/modules/gui/qt/player/qml/Player.qml
@@ -205,7 +205,7 @@ Widgets.NavigableFocusScope {
component: rootPlayer.pinVideoControls ? backgroundForPinnedControls : topcontrolViewBackground
onContentItemChanged: {
if (rootPlayer.pinVideoControls)
- contentItem.height = Qt.binding(function () { return topcontrolView.height; })
+ contentItem.height = Qt.binding(function () { return topcontrolView.height + topcontrolView.anchors.topMargin; })
}
Component {
@@ -287,6 +287,9 @@ Widgets.NavigableFocusScope {
top: parent.top
left: parent.left
right: parent.right
+ topMargin: VLCStyle.applicationVerticalMargin
+ leftMargin: VLCStyle.applicationHorizontalMargin
+ rightMargin: VLCStyle.applicationHorizontalMargin
}
z: 1
diff --git a/modules/gui/qt/player/qml/ResumeDialog.qml b/modules/gui/qt/player/qml/ResumeDialog.qml
index db108ffbbd..07f73eb921 100644
--- a/modules/gui/qt/player/qml/ResumeDialog.qml
+++ b/modules/gui/qt/player/qml/ResumeDialog.qml
@@ -97,11 +97,9 @@ Widgets.NavigableFocusScope {
RowLayout {
id: layout
- anchors.fill: parent
- anchors.topMargin: VLCStyle.applicationVerticalMargin
- anchors.leftMargin: VLCStyle.applicationHorizontalMargin + VLCStyle.margin_small
- anchors.rightMargin: VLCStyle.applicationHorizontalMargin
+ anchors.fill: parent
+ anchors.leftMargin: VLCStyle.margin_small
spacing: VLCStyle.margin_small
Text {
diff --git a/modules/gui/qt/player/qml/TopBar.qml b/modules/gui/qt/player/qml/TopBar.qml
index b865f725b2..4aa53d15a8 100644
--- a/modules/gui/qt/player/qml/TopBar.qml
+++ b/modules/gui/qt/player/qml/TopBar.qml
@@ -84,10 +84,7 @@ Widgets.NavigableFocusScope{
hoverEnabled: true
anchors.fill: parent
- anchors.topMargin: VLCStyle.applicationVerticalMargin
- anchors.leftMargin: VLCStyle.applicationHorizontalMargin
- anchors.rightMargin: VLCStyle.applicationHorizontalMargin
- implicitHeight: rowLayout.implicitHeight + anchors.topMargin
+ implicitHeight: rowLayout.implicitHeight
onContainsMouseChanged: topFocusScope.requestLockUnlockAutoHide(containsMouse, topFocusScope)
--
2.25.1
More information about the vlc-devel
mailing list