feat: update accent color for macos

This commit is contained in:
dscyrescotti
2024-07-11 21:09:57 +07:00
parent 65311c6ec9
commit 007d4ab755
4 changed files with 13 additions and 20 deletions

View File

@@ -28,6 +28,9 @@ struct ElementToolbar: View {
ZStack(alignment: .bottom) {
if tool.selection == .photo {
PhotoDock(tool: tool, canvas: canvas)
.padding(.bottom, 10)
.frame(maxWidth: .infinity)
.transition(.move(edge: .bottom).combined(with: .blurReplace))
} else {
compactToolbar
}
@@ -35,7 +38,7 @@ struct ElementToolbar: View {
}
#endif
}
.foregroundStyle(Color.accentColor)
}
var regularToolbar: some View {

View File

@@ -78,6 +78,7 @@ struct MemoView: View {
.transition(.move(edge: .trailing).combined(with: .blurReplace))
}
}
.frame(maxWidth: .infinity, alignment: .trailing)
default:
EmptyView()
}
@@ -111,25 +112,6 @@ struct MemoView: View {
.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
@@ -157,6 +139,7 @@ struct MemoView: View {
}
} label: {
Text(zoomScale / 100, format: .percent)
.foregroundStyle(Color.accentColor)
.font(.subheadline)
.frame(height: size)
.clipShape(.rect(cornerRadius: 8))

View File

@@ -22,12 +22,17 @@ struct PhotoDock: View {
var body: some View {
Group {
#if os(macOS)
photoOption
#else
if horizontalSizeClass == .regular {
photoOption
} else {
compactPhotoOption
}
#endif
}
.foregroundStyle(Color.accentColor)
#if os(iOS)
.fullScreenCover(isPresented: $opensCamera) {
let image: Binding<UIImage?> = Binding {

View File

@@ -36,6 +36,7 @@ struct Toolbar: View {
HStack(spacing: 5) {
closeButton
titleField
.foregroundStyle(Color.primary)
}
.frame(maxWidth: .infinity, alignment: .leading)
#if os(macOS)
@@ -53,6 +54,7 @@ struct Toolbar: View {
}
.font(.subheadline)
.padding(10)
.foregroundStyle(Color.accentColor)
}
var closeButton: some View {