Better hovering on macos for the labels editor
This commit is contained in:
@ -381,17 +381,7 @@ public struct ShareExtensionView: View {
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.horizontal, 8)
|
||||
.focused($focusedField, equals: .labelEditor)
|
||||
#if os(macOS)
|
||||
.onHover { isHovered in
|
||||
DispatchQueue.main.async {
|
||||
if isHovered {
|
||||
NSCursor.iBeam.push()
|
||||
} else {
|
||||
NSCursor.pop()
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if labelsViewModel.selectedLabels.isEmpty, labelsSearch == ZWSP {
|
||||
Text("Type to add labels")
|
||||
.fontWeight(.light)
|
||||
|
||||
@ -194,7 +194,17 @@ public struct LabelsEntryView: View {
|
||||
}
|
||||
}.padding(0)
|
||||
.frame(height: totalHeight)
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(Color.extensionPanelBackground)
|
||||
.onHover { isHovered in
|
||||
DispatchQueue.main.async {
|
||||
if isHovered {
|
||||
NSCursor.iBeam.push()
|
||||
} else {
|
||||
NSCursor.pop()
|
||||
}
|
||||
}
|
||||
}
|
||||
.cornerRadius(8)
|
||||
.onAppear {
|
||||
textFieldFocused = true
|
||||
@ -299,6 +309,7 @@ public struct LabelsEntryView: View {
|
||||
createLabelButton
|
||||
}.padding(4)
|
||||
}
|
||||
|
||||
#endif
|
||||
}.background(viewHeightReader($totalHeight))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user