mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Add ScrollHint
This commit is contained in:
parent
e1132e6a16
commit
047964f7c6
2 changed files with 26 additions and 3 deletions
|
|
@ -80,13 +80,17 @@ struct MusicSlotConfigurationView: View {
|
|||
|
||||
private var palette: some View {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text("Control Palette")
|
||||
.font(.headline)
|
||||
HStack(spacing: 8) {
|
||||
Text("Control Palette")
|
||||
.font(.headline)
|
||||
Spacer()
|
||||
ScrollHintIndicator()
|
||||
}
|
||||
Text("Drag a control onto a slot or tap to place it in the first empty slot.")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
ScrollView(.horizontal, showsIndicators: true) {
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(spacing: 12) {
|
||||
ForEach(pickerOptions, id: \.self) { control in
|
||||
paletteItem(for: control)
|
||||
|
|
@ -97,6 +101,21 @@ struct MusicSlotConfigurationView: View {
|
|||
}
|
||||
}
|
||||
|
||||
private struct ScrollHintIndicator: View {
|
||||
var body: some View {
|
||||
HStack(spacing: 2) {
|
||||
Image(systemName: "chevron.left")
|
||||
Text("Scroll")
|
||||
Image(systemName: "chevron.right")
|
||||
}
|
||||
.font(.caption2.weight(.medium))
|
||||
.foregroundStyle(.secondary)
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.vertical, 4)
|
||||
.background(Color.primary.opacity(0.08), in: Capsule())
|
||||
}
|
||||
}
|
||||
|
||||
private var resetButton: some View {
|
||||
HStack {
|
||||
Spacer()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue