summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/recorder/Controls.qml
diff options
context:
space:
mode:
authorSamuel Mira <samuel.mira@qt.io>2021-09-03 18:42:47 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-08 10:44:07 +0000
commit1382fa0f0b017f3fed690566ea903dfd216b7519 (patch)
tree4ab765d4f7d1dd5f408f74f6503151e6b82ac79c /examples/multimedia/video/recorder/Controls.qml
parent377d3435936aade9820b97e792e77447a4a1c3d2 (diff)
Improve QML Recorder example
Changed QML and added some cases just for mobile. Tested mostly on android. Hid metadata adding feature on mobile since it is not implemented. Task-number: QTBUG-96077 Change-Id: I524767232561bef7716830ed0f9360e7c0662f0f Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit f52141f1cf85f84e0b2a93d9c4e88723cf1d622a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/multimedia/video/recorder/Controls.qml')
-rw-r--r--examples/multimedia/video/recorder/Controls.qml24
1 files changed, 10 insertions, 14 deletions
diff --git a/examples/multimedia/video/recorder/Controls.qml b/examples/multimedia/video/recorder/Controls.qml
index ff810181f..baaad0ddf 100644
--- a/examples/multimedia/video/recorder/Controls.qml
+++ b/examples/multimedia/video/recorder/Controls.qml
@@ -53,9 +53,8 @@ import QtQuick.Controls
import QtQuick.Layouts
import QtMultimedia
-RowLayout {
+Row {
id: root
-
required property MediaRecorder recorder
property bool settingsVisible: false
@@ -64,6 +63,8 @@ RowLayout {
property alias audioInput: audioInputSelect.selected
property alias camera: cameraSelect.selected
+ spacing: Style.interSpacing * Style.ratio
+
Column {
id: inputControls
spacing: Style.intraSpacing
@@ -72,11 +73,6 @@ RowLayout {
AudioInputSelect { id: audioInputSelect }
}
- Item {
- // Position RecordButton in the center
- Layout.minimumWidth: root.width / 2 - inputControls.width - recordButton.width / 2
- }
-
Column {
width: recordButton.width
RecordButton {
@@ -87,28 +83,28 @@ RowLayout {
Text {
id: recordingTime
anchors.horizontalCenter: parent.horizontalCenter
+ font.pointSize: Style.fontSize
}
}
- Item {
- Layout.fillWidth: true
- }
-
Column {
+ id: optionButtons
spacing: Style.intraSpacing
Button {
height: Style.height
- width: Style.widthShort
+ width: Style.widthMedium
background: StyleRectangle { anchors.fill: parent }
onClicked: root.capturesVisible = !root.capturesVisible
text: "Captures"
+ font.pointSize: Style.fontSize
}
Button {
height: Style.height
- width: Style.widthShort
+ width: Style.widthMedium
background: StyleRectangle { anchors.fill: parent }
- onClicked: root.settingsVisible = !root.settingsVisible
+ onClicked: settingsVisible = !settingsVisible
text: "Settings"
+ font.pointSize: Style.fontSize
}
}