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
committerSamuel Mira <samuel.mira@qt.io>2021-09-08 12:58:27 +0300
commitf52141f1cf85f84e0b2a93d9c4e88723cf1d622a (patch)
tree822232a6932fcc368bf7ee30b3021be3723d67fb /examples/multimedia/video/recorder/Controls.qml
parent1115b5220eb5006b5193d634382bc0081f31e95b (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 Pick-to: 6.2 6.2.0 Change-Id: I524767232561bef7716830ed0f9360e7c0662f0f Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
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
}
}