@@ -145,13 +145,15 @@ struct EditorScreen: View {
145145
146146 Spacer ( )
147147
148- PanelToolbarGroup {
148+ HStack ( spacing : SurfaceMetrics . controlGroupSpacing ) {
149149 PinButton ( )
150150
151- CopyMenuButton ( note : note )
152-
153- DeleteIconButton {
154- showDeleteConfirm = true
151+ HeaderActionMenu ( help : l10n [ " common.moreActions " ] ) { dismiss in
152+ EditorActionMenuContent (
153+ note : note ,
154+ dismiss : dismiss ,
155+ onDelete : { showDeleteConfirm = true } ,
156+ )
155157 }
156158 }
157159 }
@@ -178,32 +180,43 @@ struct EditorScreen: View {
178180 }
179181}
180182
181- // MARK: - Copy Menu Button
183+ // MARK: - Editor Action Menu
182184
183- /// Copy icon that opens a menu with plain text and Markdown copy options.
184- /// If text is selected in the editor, copies the selection; otherwise copies the whole document.
185- private struct CopyMenuButton : View {
185+ /// Editor overflow actions. If text is selected, copy actions use the selection;
186+ /// otherwise they use the whole document.
187+ private struct EditorActionMenuContent : View {
186188 let note : Note
189+ let dismiss : ( ) -> Void
190+ let onDelete : ( ) -> Void
187191
188192 var body : some View {
189193 let l10n = L10n . shared
190- return AdaptiveIconMenu (
191- systemName : " doc.on.doc " ,
192- help : l10n [ " editor.copyNote " ] ,
193- ) {
194- Button ( l10n [ " common.copyPlainText " ] ) {
194+ VStack ( spacing : 2 ) {
195+ HeaderActionButton (
196+ title : l10n [ " common.copyPlainText " ] ,
197+ systemName : " doc.on.doc " ,
198+ ) {
199+ dismiss ( )
195200 let selected = Self . getSelectedText ( )
196201 let source = selected . isEmpty ? note . content : selected
197202 NSPasteboard . general . clearContents ( )
198203 NSPasteboard . general . setString ( Note . plainText ( from : source ) , forType : . string )
199204 }
200- Button ( l10n [ " common.copyMarkdown " ] ) {
205+ HeaderActionButton (
206+ title : l10n [ " common.copyMarkdown " ] ,
207+ systemName : " doc.text " ,
208+ ) {
209+ dismiss ( )
201210 let selected = Self . getSelectedText ( )
202211 let text = selected . isEmpty ? note . content : selected
203212 NSPasteboard . general . clearContents ( )
204213 NSPasteboard . general . setString ( text , forType : . string )
205214 }
206- Button ( l10n [ " common.copyRTF " ] ) {
215+ HeaderActionButton (
216+ title : l10n [ " common.copyRTF " ] ,
217+ systemName : " doc.richtext " ,
218+ ) {
219+ dismiss ( )
207220 let selected = Self . getSelectedText ( )
208221 let source = selected . isEmpty ? note . content : selected
209222 let pb = NSPasteboard . general
@@ -214,6 +227,18 @@ private struct CopyMenuButton: View {
214227 pb . setString ( Note . plainText ( from : source ) , forType : . string )
215228 }
216229 }
230+
231+ Divider ( )
232+ . padding ( . vertical , 2 )
233+
234+ HeaderActionButton (
235+ title : l10n [ " editor.deleteNote " ] ,
236+ systemName : " trash " ,
237+ role : . destructive ,
238+ ) {
239+ dismiss ( )
240+ onDelete ( )
241+ }
217242 }
218243 }
219244
@@ -225,22 +250,6 @@ private struct CopyMenuButton: View {
225250 }
226251}
227252
228- // MARK: - Delete Icon Button
229-
230- /// Trash icon that turns red on hover.
231- private struct DeleteIconButton : View {
232- let action : ( ) -> Void
233-
234- var body : some View {
235- AdaptiveIconButton (
236- systemName : " trash " ,
237- help : L10n . shared [ " editor.deleteNote " ] ,
238- role : . destructive ,
239- action : action ,
240- )
241- }
242- }
243-
244253// MARK: - Date Label View
245254
246255/// Icon + date text in a compact row with hover tooltip.
0 commit comments