aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/island/ObsPill.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/island/ObsPill.qml')
-rw-r--r--desktop/island/ObsPill.qml88
1 files changed, 63 insertions, 25 deletions
diff --git a/desktop/island/ObsPill.qml b/desktop/island/ObsPill.qml
index 73b35b0..6ae9b4e 100644
--- a/desktop/island/ObsPill.qml
+++ b/desktop/island/ObsPill.qml
@@ -78,46 +78,84 @@ Capsule {
Row {
spacing: 8
Button {
+ icon: Obs.recording ? "\udb81\ude66" : "\udb83\udec2"
text: Obs.recording ? "Stop" : "Record"
danger: Obs.recording
onClicked: Obs.toggleRecord()
}
Button {
visible: Obs.recording
+ icon: Obs.paused ? "\udb81\udc0a" : "\udb80\udfe4"
text: Obs.paused ? "Resume" : "Pause"
onClicked: Obs.togglePause()
}
+ }
+
+ Row {
+ spacing: 8
+ visible: Obs.camId >= 0 || Obs.desktopAudio !== ""
Button {
visible: Obs.camId >= 0
- text: Obs.camOn ? "Hide webcam" : "Show webcam"
+ icon: Obs.camOn ? "\udb81\udd67" : "\udb81\udd68"
+ text: "Webcam"
onClicked: Obs.toggleCam()
}
+ Button {
+ visible: Obs.desktopAudio !== ""
+ icon: Obs.desktopMuted ? "\udb81\udd81" : "\udb81\udd7e"
+ text: "Audio"
+ onClicked: Obs.toggleAudio()
+ }
}
- // ponytail: a plain Column, no scrolling; about ten scenes fit the
- // island's 480px window. A ListView if a scene collection outgrows it.
- Repeater {
- model: Obs.scenes
- delegate: Rectangle {
- required property string modelData
- readonly property bool current: modelData === Obs.scene
- width: controls.width
- height: 30
- radius: 7
- color: current ? Qt.alpha(Theme.accent, 0.25)
- : area.containsMouse ? Qt.alpha(Theme.surface, 0.8) : "transparent"
- Text {
- anchors { left: parent.left; leftMargin: 10; verticalCenter: parent.verticalCenter }
- text: modelData
- color: current ? Theme.text : Theme.subtext
- font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2 }
- }
- MouseArea {
- id: area
- anchors.fill: parent
- hoverEnabled: true
- cursorShape: Qt.PointingHandCursor
- onClicked: Obs.setScene(modelData)
+ // The webcam's four corners on the recorded canvas.
+ Row {
+ spacing: 8
+ visible: Obs.camId >= 0
+ Button { icon: "\udb80\udc5b"; onClicked: Obs.moveCam("tl") }
+ Button { icon: "\udb80\udc5c"; onClicked: Obs.moveCam("tr") }
+ Button { icon: "\udb80\udc42"; onClicked: Obs.moveCam("bl") }
+ Button { icon: "\udb80\udc43"; onClicked: Obs.moveCam("br") }
+ }
+
+ // ponytail: four columns, two rows visible; the wheel scrolls beyond
+ // eight scenes. Selection is click-only, so scrolling never switches.
+ Flickable {
+ width: controls.width
+ height: Math.min(80, grid.childrenRect.height)
+ contentHeight: grid.childrenRect.height
+ clip: true
+ flickableDirection: Flickable.VerticalFlick
+
+ Grid {
+ id: grid
+ columns: 4
+ spacing: 8
+
+ Repeater {
+ model: Obs.scenes
+ delegate: Rectangle {
+ required property string modelData
+ readonly property bool current: modelData === Obs.scene
+ width: 36
+ height: 36
+ radius: 8
+ color: current ? Qt.alpha(Theme.accent, 0.25)
+ : area.containsMouse ? Qt.alpha(Theme.surface, 0.8) : "transparent"
+ Text {
+ anchors.centerIn: parent
+ text: SceneIcons.iconFor(modelData)
+ color: current ? Theme.text : Theme.subtext
+ font { family: Theme.iconFamily; pixelSize: 18 }
+ }
+ MouseArea {
+ id: area
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: Qt.PointingHandCursor
+ onClicked: Obs.setScene(modelData)
+ }
+ }
}
}
}