@@ -43,8 +43,8 @@ final class BookmarkEditorController: NSViewController {
4343 // MARK: - Lifecycle
4444
4545 override func loadView( ) {
46- // Create main container
47- let contentView = NSView ( frame: NSRect ( x: 0 , y: 0 , width: 450 , height: 380 ) )
46+ // Create main container with better spacing
47+ let contentView = NSView ( frame: NSRect ( x: 0 , y: 0 , width: 520 , height: 360 ) )
4848 contentView. translatesAutoresizingMaskIntoConstraints = false
4949
5050 // Build form using NSGridView (native macOS form layout)
@@ -57,12 +57,12 @@ final class BookmarkEditorController: NSViewController {
5757 contentView. addSubview ( buttonStack)
5858
5959 NSLayoutConstraint . activate ( [
60- gridView. topAnchor. constraint ( equalTo: contentView. topAnchor, constant: 20 ) ,
61- gridView. leadingAnchor. constraint ( equalTo: contentView. leadingAnchor, constant: 20 ) ,
62- gridView. trailingAnchor. constraint ( equalTo: contentView. trailingAnchor, constant: - 20 ) ,
60+ gridView. topAnchor. constraint ( equalTo: contentView. topAnchor, constant: 24 ) ,
61+ gridView. leadingAnchor. constraint ( equalTo: contentView. leadingAnchor, constant: 24 ) ,
62+ gridView. trailingAnchor. constraint ( equalTo: contentView. trailingAnchor, constant: - 24 ) ,
6363
64- buttonStack. topAnchor. constraint ( equalTo: gridView. bottomAnchor, constant: 20 ) ,
65- buttonStack. trailingAnchor. constraint ( equalTo: contentView. trailingAnchor, constant: - 20 ) ,
64+ buttonStack. topAnchor. constraint ( equalTo: gridView. bottomAnchor, constant: 24 ) ,
65+ buttonStack. trailingAnchor. constraint ( equalTo: contentView. trailingAnchor, constant: - 24 ) ,
6666 buttonStack. bottomAnchor. constraint ( equalTo: contentView. bottomAnchor, constant: - 20 )
6767 ] )
6868
@@ -73,7 +73,7 @@ final class BookmarkEditorController: NSViewController {
7373 super. viewDidLoad ( )
7474 title = isEditing ? " Edit Bookmark " : " New Bookmark "
7575 populateFields ( )
76- preferredContentSize = NSSize ( width: 450 , height: 400 )
76+ preferredContentSize = NSSize ( width: 520 , height: 380 )
7777
7878 // Add accessibility identifiers
7979 nameField. setAccessibilityIdentifier ( " bookmarkNameField " )
@@ -91,23 +91,29 @@ final class BookmarkEditorController: NSViewController {
9191 // Name row
9292 let nameLabel = NSTextField ( labelWithString: " Name: " )
9393 nameLabel. alignment = . right
94+ nameLabel. font = . systemFont( ofSize: 13 )
9495 nameField = NSTextField ( )
9596 nameField. placeholderString = " Bookmark name "
97+ nameField. font = . systemFont( ofSize: 13 )
9698
9799 // Query row
98100 let queryLabel = NSTextField ( labelWithString: " Query: " )
99101 queryLabel. alignment = . right
102+ queryLabel. font = . systemFont( ofSize: 13 )
100103 let queryScrollView = buildQueryScrollView ( )
101104
102105 // Tags row
103106 let tagsLabel = NSTextField ( labelWithString: " Tags: " )
104107 tagsLabel. alignment = . right
108+ tagsLabel. font = . systemFont( ofSize: 13 )
105109 tagsField = NSTextField ( )
106- tagsField. placeholderString = " Optional, comma-separated "
110+ tagsField. placeholderString = " e.g., reports, analytics, daily "
111+ tagsField. font = . systemFont( ofSize: 13 )
107112
108113 // Notes row
109114 let notesLabel = NSTextField ( labelWithString: " Notes: " )
110115 notesLabel. alignment = . right
116+ notesLabel. font = . systemFont( ofSize: 13 )
111117 let notesScrollView = buildNotesScrollView ( )
112118
113119 // Create grid
@@ -119,24 +125,24 @@ final class BookmarkEditorController: NSViewController {
119125 ] )
120126
121127 gridView. translatesAutoresizingMaskIntoConstraints = false
122- gridView. columnSpacing = 10
123- gridView. rowSpacing = 14
128+ gridView. columnSpacing = 12
129+ gridView. rowSpacing = 16
124130
125- // Configure column widths ( slightly wider for label column)
126- gridView. column ( at: 0 ) . width = 65
131+ // Configure column widths - slightly wider label column
132+ gridView. column ( at: 0 ) . width = 70
127133 gridView. column ( at: 0 ) . xPlacement = . trailing
128134
129- // Configure row alignments
135+ // Configure row alignments with better padding
130136 gridView. row ( at: 0 ) . topPadding = 0
131- gridView. row ( at: 1 ) . topPadding = 6
132- gridView. row ( at: 2 ) . topPadding = 6
133- gridView. row ( at: 3 ) . topPadding = 6
137+ gridView. row ( at: 1 ) . topPadding = 8
138+ gridView. row ( at: 2 ) . topPadding = 8
139+ gridView. row ( at: 3 ) . topPadding = 8
134140
135141 // Align labels to top for multi-line fields
136142 gridView. cell ( atColumnIndex: 0 , rowIndex: 1 ) . yPlacement = . top
137143 gridView. cell ( atColumnIndex: 0 , rowIndex: 3 ) . yPlacement = . top
138144
139- // Set heights for scroll views with better proportions
145+ // Set heights for scroll views
140146 queryScrollView. heightAnchor. constraint ( equalToConstant: 90 ) . isActive = true
141147 notesScrollView. heightAnchor. constraint ( equalToConstant: 70 ) . isActive = true
142148
@@ -156,7 +162,7 @@ final class BookmarkEditorController: NSViewController {
156162 queryTextView. isSelectable = true
157163 queryTextView. font = . monospacedSystemFont( ofSize: 11 , weight: . regular)
158164 queryTextView. string = query
159- queryTextView. textContainerInset = NSSize ( width: 6 , height: 6 )
165+ queryTextView. textContainerInset = NSSize ( width: 8 , height: 8 )
160166 queryTextView. isVerticallyResizable = true
161167 queryTextView. isHorizontallyResizable = false
162168 queryTextView. autoresizingMask = [ . width]
@@ -180,7 +186,7 @@ final class BookmarkEditorController: NSViewController {
180186 notesTextView = NSTextView ( )
181187 notesTextView. isRichText = false
182188 notesTextView. font = . systemFont( ofSize: 13 )
183- notesTextView. textContainerInset = NSSize ( width: 6 , height: 6 )
189+ notesTextView. textContainerInset = NSSize ( width: 8 , height: 8 )
184190 notesTextView. isVerticallyResizable = true
185191 notesTextView. isHorizontallyResizable = false
186192 notesTextView. autoresizingMask = [ . width]
@@ -194,11 +200,11 @@ final class BookmarkEditorController: NSViewController {
194200 private func buildButtonStack( ) -> NSStackView {
195201 let cancelButton = NSButton ( title: " Cancel " , target: self , action: #selector( cancelAction) )
196202 cancelButton. bezelStyle = . rounded
197- cancelButton. keyEquivalent = " \u{1b} "
203+ cancelButton. keyEquivalent = " \u{1b} " // Escape
198204
199205 let saveButton = NSButton ( title: isEditing ? " Save " : " Save Bookmark " , target: self , action: #selector( saveAction) )
200206 saveButton. bezelStyle = . rounded
201- saveButton. keyEquivalent = " \r "
207+ saveButton. keyEquivalent = " \r " // Return
202208
203209 let stackView = NSStackView ( views: [ cancelButton, saveButton] )
204210 stackView. orientation = . horizontal
0 commit comments