mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-04-24 09:38:33 +02:00
feat: update accent color for macos
This commit is contained in:
@@ -28,6 +28,9 @@ struct ElementToolbar: View {
|
|||||||
ZStack(alignment: .bottom) {
|
ZStack(alignment: .bottom) {
|
||||||
if tool.selection == .photo {
|
if tool.selection == .photo {
|
||||||
PhotoDock(tool: tool, canvas: canvas)
|
PhotoDock(tool: tool, canvas: canvas)
|
||||||
|
.padding(.bottom, 10)
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.transition(.move(edge: .bottom).combined(with: .blurReplace))
|
||||||
} else {
|
} else {
|
||||||
compactToolbar
|
compactToolbar
|
||||||
}
|
}
|
||||||
@@ -35,7 +38,7 @@ struct ElementToolbar: View {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
.foregroundStyle(Color.accentColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
var regularToolbar: some View {
|
var regularToolbar: some View {
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ struct MemoView: View {
|
|||||||
.transition(.move(edge: .trailing).combined(with: .blurReplace))
|
.transition(.move(edge: .trailing).combined(with: .blurReplace))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.frame(maxWidth: .infinity, alignment: .trailing)
|
||||||
default:
|
default:
|
||||||
EmptyView()
|
EmptyView()
|
||||||
}
|
}
|
||||||
@@ -111,25 +112,6 @@ struct MemoView: View {
|
|||||||
.transition(.move(edge: .bottom).combined(with: .blurReplace))
|
.transition(.move(edge: .bottom).combined(with: .blurReplace))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// .overlay(alignment: .bottom) {
|
|
||||||
// if tool.selection != .hand {
|
|
||||||
// Button {
|
|
||||||
// withAnimation {
|
|
||||||
// tool.selectTool(.hand)
|
|
||||||
// }
|
|
||||||
// } label: {
|
|
||||||
// Image(systemName: "chevron.compact.down")
|
|
||||||
// .font(.headline)
|
|
||||||
// .frame(width: 80)
|
|
||||||
// .padding(5)
|
|
||||||
// .background(.regularMaterial)
|
|
||||||
// .clipShape(.capsule)
|
|
||||||
// .contentShape(.capsule)
|
|
||||||
// }
|
|
||||||
// .offset(y: 5)
|
|
||||||
// .transition(.move(edge: .bottom).combined(with: .blurReplace))
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
@@ -157,6 +139,7 @@ struct MemoView: View {
|
|||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
Text(zoomScale / 100, format: .percent)
|
Text(zoomScale / 100, format: .percent)
|
||||||
|
.foregroundStyle(Color.accentColor)
|
||||||
.font(.subheadline)
|
.font(.subheadline)
|
||||||
.frame(height: size)
|
.frame(height: size)
|
||||||
.clipShape(.rect(cornerRadius: 8))
|
.clipShape(.rect(cornerRadius: 8))
|
||||||
|
|||||||
@@ -22,12 +22,17 @@ struct PhotoDock: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Group {
|
Group {
|
||||||
|
#if os(macOS)
|
||||||
|
photoOption
|
||||||
|
#else
|
||||||
if horizontalSizeClass == .regular {
|
if horizontalSizeClass == .regular {
|
||||||
photoOption
|
photoOption
|
||||||
} else {
|
} else {
|
||||||
compactPhotoOption
|
compactPhotoOption
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
.foregroundStyle(Color.accentColor)
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.fullScreenCover(isPresented: $opensCamera) {
|
.fullScreenCover(isPresented: $opensCamera) {
|
||||||
let image: Binding<UIImage?> = Binding {
|
let image: Binding<UIImage?> = Binding {
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ struct Toolbar: View {
|
|||||||
HStack(spacing: 5) {
|
HStack(spacing: 5) {
|
||||||
closeButton
|
closeButton
|
||||||
titleField
|
titleField
|
||||||
|
.foregroundStyle(Color.primary)
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
@@ -53,6 +54,7 @@ struct Toolbar: View {
|
|||||||
}
|
}
|
||||||
.font(.subheadline)
|
.font(.subheadline)
|
||||||
.padding(10)
|
.padding(10)
|
||||||
|
.foregroundStyle(Color.accentColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
var closeButton: some View {
|
var closeButton: some View {
|
||||||
|
|||||||
Reference in New Issue
Block a user