mirror of
https://github.com/neon443/NearFuture.git
synced 2026-03-11 06:49:12 +00:00
mac ui
This commit is contained in:
@@ -16,7 +16,9 @@ struct ContentView: View {
|
||||
ForEach(viewModel.events) { event in
|
||||
EventListView(viewModel: viewModel, event: event)
|
||||
}
|
||||
.padding(.trailing)
|
||||
}
|
||||
.scrollContentBackground(.hidden)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,11 @@ struct EventListView: View {
|
||||
@State var event: Event
|
||||
|
||||
@State var largeTick: Bool = false
|
||||
@State var hovering: Bool = false
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Color.two
|
||||
Color.black.opacity(hovering ? 0.5 : 0.0)
|
||||
HStack {
|
||||
RoundedRectangle(cornerRadius: 5)
|
||||
.frame(width: 7)
|
||||
@@ -121,10 +122,13 @@ struct EventListView: View {
|
||||
}
|
||||
}
|
||||
.transition(.opacity)
|
||||
.padding(.vertical, 5)
|
||||
.background(.ultraThinMaterial)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
.onHover { isHovering in
|
||||
withAnimation {
|
||||
hovering.toggle()
|
||||
}
|
||||
}
|
||||
.contextMenu() {
|
||||
Button(role: .destructive) {
|
||||
let eventToModify = viewModel.events.firstIndex() { currEvent in
|
||||
|
||||
Reference in New Issue
Block a user