Move draw controls into the draw toolbar
The color picker, undo/redo, and clear eraser now live in the dedicated
draw top bar instead of the main toolbar, keeping the primary actions
(Copy/Save/Get Text) uncluttered. Keyboard shortcuts (⌘Z/⌘⇧Z) remain.
💘 Generated with Crush
Assisted-by: Crush:deepseek-v4-flash-0731
This commit is contained in:
@@ -305,49 +305,6 @@ struct ResultView: View {
|
|||||||
.foregroundStyle(model.isDrawing ? .primary : .secondary)
|
.foregroundStyle(model.isDrawing ? .primary : .secondary)
|
||||||
.help("Toggle drawing on the screenshot")
|
.help("Toggle drawing on the screenshot")
|
||||||
|
|
||||||
if model.isDrawing {
|
|
||||||
ColorPicker("", selection: Binding(
|
|
||||||
get: { Color(nsColor: model.drawColor) },
|
|
||||||
set: { model.drawColor = NSColor($0) }
|
|
||||||
), supportsOpacity: false)
|
|
||||||
.labelsHidden()
|
|
||||||
.frame(width: 28)
|
|
||||||
.help("Drawing color")
|
|
||||||
}
|
|
||||||
|
|
||||||
if model.isDrawing || !model.strokes.isEmpty {
|
|
||||||
HStack(spacing: 6) {
|
|
||||||
Button {
|
|
||||||
model.undoStroke()
|
|
||||||
} label: {
|
|
||||||
Image(systemName: "arrow.uturn.backward")
|
|
||||||
}
|
|
||||||
.buttonStyle(.bordered)
|
|
||||||
.disabled(!model.canUndo)
|
|
||||||
.keyboardShortcut("z", modifiers: .command)
|
|
||||||
.help("Undo last stroke (⌘Z)")
|
|
||||||
|
|
||||||
Button {
|
|
||||||
model.redoStroke()
|
|
||||||
} label: {
|
|
||||||
Image(systemName: "arrow.uturn.forward")
|
|
||||||
}
|
|
||||||
.buttonStyle(.bordered)
|
|
||||||
.disabled(!model.canRedo)
|
|
||||||
.keyboardShortcut("z", modifiers: [.command, .shift])
|
|
||||||
.help("Redo stroke (⌘⇧Z)")
|
|
||||||
|
|
||||||
Button {
|
|
||||||
model.clearAnnotations()
|
|
||||||
} label: {
|
|
||||||
Image(systemName: "eraser")
|
|
||||||
}
|
|
||||||
.buttonStyle(.bordered)
|
|
||||||
.disabled(model.strokes.isEmpty)
|
|
||||||
.help("Remove all drawn annotations")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
model.copyImage()
|
model.copyImage()
|
||||||
} label: {
|
} label: {
|
||||||
@@ -417,6 +374,7 @@ struct ResultView: View {
|
|||||||
.buttonStyle(.bordered)
|
.buttonStyle(.bordered)
|
||||||
.controlSize(.small)
|
.controlSize(.small)
|
||||||
.disabled(!model.canUndo)
|
.disabled(!model.canUndo)
|
||||||
|
.keyboardShortcut("z", modifiers: .command)
|
||||||
.help("Undo last stroke (⌘Z)")
|
.help("Undo last stroke (⌘Z)")
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
@@ -427,6 +385,7 @@ struct ResultView: View {
|
|||||||
.buttonStyle(.bordered)
|
.buttonStyle(.bordered)
|
||||||
.controlSize(.small)
|
.controlSize(.small)
|
||||||
.disabled(!model.canRedo)
|
.disabled(!model.canRedo)
|
||||||
|
.keyboardShortcut("z", modifiers: [.command, .shift])
|
||||||
.help("Redo stroke (⌘⇧Z)")
|
.help("Redo stroke (⌘⇧Z)")
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 14)
|
.padding(.horizontal, 14)
|
||||||
|
|||||||
+2
-2
@@ -108,9 +108,9 @@ cat > "$APP/Contents/Info.plist" <<'PLIST'
|
|||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>Icon</string>
|
<string>Icon</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.4.0</string>
|
<string>1.4.1</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>40</string>
|
<string>41</string>
|
||||||
<key>LSUIElement</key>
|
<key>LSUIElement</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSHighResolutionCapable</key>
|
<key>NSHighResolutionCapable</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user