cursor
This commit is contained in:
@@ -24,6 +24,7 @@ public final class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
}
|
||||
|
||||
public func applicationDidFinishLaunching(_ notification: Notification) {
|
||||
PointerPolicy.installCursorUpdateMonitor()
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
}
|
||||
|
||||
|
||||
@@ -144,6 +144,7 @@ private struct LauncherRow<Icon: View, Label: View, Trailing: View>: View {
|
||||
isHovered = inside
|
||||
if inside { model.perform(.launcherSelect(index)) }
|
||||
}
|
||||
.pointerHand()
|
||||
.onTapGesture {
|
||||
model.perform(.launcherSelect(index))
|
||||
model.perform(.launcherActivate)
|
||||
|
||||
@@ -48,6 +48,7 @@ struct RecentProjectsOverlay: View {
|
||||
row(project, selected: index == selection)
|
||||
.id(index)
|
||||
.onHover { inside in if inside { hover(index) } }
|
||||
.pointerHand()
|
||||
.onTapGesture { open(project) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@ private struct ProjectName: View {
|
||||
.foregroundStyle(isHovered ? Palette.text2 : Palette.text4)
|
||||
.lineLimit(1)
|
||||
.onHover { isHovered = $0 }
|
||||
.pointerHand()
|
||||
.onTapGesture(perform: action)
|
||||
.help("Open folder…")
|
||||
.animation(Metrics.colorTransition, value: isHovered)
|
||||
|
||||
@@ -31,7 +31,7 @@ struct WorkspaceView: View {
|
||||
}
|
||||
.overlay { OverlayHost(model: model) }
|
||||
.overlay {
|
||||
if model.overlay.current == .launcher { RecentProjectsOverlay(model: model) }
|
||||
if model.overlay.current == .launcher { RecentProjectsOverlay(model: model).environment(\.pointerLayer, .overlay) }
|
||||
}
|
||||
.background(PointerRefresher(trigger: PointerRefresher.Trigger(
|
||||
overlay: model.overlay.current, activePath: model.editor?.activePath, visibility: model.layout.visibility,
|
||||
|
||||
Reference in New Issue
Block a user