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
|
|
@ -16209,6 +16209,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Scroll" : {
|
||||||
|
"comment" : "A hint text that appears when scrolling horizontally in the control palette.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Search clipboard..." : {
|
"Search clipboard..." : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"fr" : {
|
"fr" : {
|
||||||
|
|
|
||||||
|
|
@ -80,13 +80,17 @@ struct MusicSlotConfigurationView: View {
|
||||||
|
|
||||||
private var palette: some View {
|
private var palette: some View {
|
||||||
VStack(alignment: .leading, spacing: 6) {
|
VStack(alignment: .leading, spacing: 6) {
|
||||||
Text("Control Palette")
|
HStack(spacing: 8) {
|
||||||
.font(.headline)
|
Text("Control Palette")
|
||||||
|
.font(.headline)
|
||||||
|
Spacer()
|
||||||
|
ScrollHintIndicator()
|
||||||
|
}
|
||||||
Text("Drag a control onto a slot or tap to place it in the first empty slot.")
|
Text("Drag a control onto a slot or tap to place it in the first empty slot.")
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
|
|
||||||
ScrollView(.horizontal, showsIndicators: true) {
|
ScrollView(.horizontal, showsIndicators: false) {
|
||||||
HStack(spacing: 12) {
|
HStack(spacing: 12) {
|
||||||
ForEach(pickerOptions, id: \.self) { control in
|
ForEach(pickerOptions, id: \.self) { control in
|
||||||
paletteItem(for: control)
|
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 {
|
private var resetButton: some View {
|
||||||
HStack {
|
HStack {
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue