diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-15 17:30:38 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-09-15 17:34:36 -0300 |
| commit | e462d566f710e714e3b7176672e98fc82a6dea62 (patch) | |
| tree | 64b3e9dc1ef36aeedbaae7f7e3a77b556676b952 /src/macos | |
| parent | ebe561b8083782a105a2ee29fb0a031d1c2427d3 (diff) | |
| download | pardes-e462d566f710e714e3b7176672e98fc82a6dea62.tar.gz pardes-e462d566f710e714e3b7176672e98fc82a6dea62.zip | |
Separate pane and column grip hit areas from tagline text with a small gap
Diffstat (limited to 'src/macos')
| -rw-r--r-- | src/macos/Sources/PardesView.swift | 2 | ||||
| -rw-r--r-- | src/macos/pardes.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/macos/Sources/PardesView.swift b/src/macos/Sources/PardesView.swift index ba05ea51..e2234264 100644 --- a/src/macos/Sources/PardesView.swift +++ b/src/macos/Sources/PardesView.swift @@ -1172,7 +1172,7 @@ final class PardesView: NSView { private func drawTagGrip(_ ctx: CGContext, values: [Int], canonical: UnsafePointer<pardes_cell_s>, cols: Int, rows: Int) { let width = Int(pardes_grip_columns()) - let x = values[4] - width, y = values[5] + let x = values[4] - Int(pardes_tag_text_inset()), y = values[5] if values[1] != 2 || x < 0 || x >= cols || y >= rows || taglines.height < 6 || taglines.width < 3 { return } var cell = canonical[y * cols + x] let text = withUnsafeBytes(of: &cell.text) { String(decoding: $0.prefix(Int(cell.len)), as: UTF8.self) } diff --git a/src/macos/pardes.h b/src/macos/pardes.h index 15a76d04..48f38e58 100644 --- a/src/macos/pardes.h +++ b/src/macos/pardes.h @@ -341,6 +341,7 @@ void pardes_mouse_pixel(pardes_mouse_button_e button, pardes_mouse_kind_e kind, uint16_t col, uint16_t row, uint32_t mods, float x, float y, float body_w, float body_h, float tagline_w, float tagline_h); void pardes_row_metrics(uint16_t body_w, uint16_t body_h, uint16_t tagline_w, uint16_t tagline_h); +uint32_t pardes_tag_text_inset(void); uint32_t pardes_grip_columns(void); uint32_t pardes_tag_layer_limit(void); uint32_t pardes_tag_layer_value(uint32_t index, uint32_t field); |
