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) { 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 {

View File

@@ -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))

View File

@@ -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 {

View File

@@ -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 {