From 9cb573d96536c94f7c85e1d4b63e2644e7ef87f5 Mon Sep 17 00:00:00 2001 From: "5684185+vsariola@users.noreply.github.com" <5684185+vsariola@users.noreply.github.com> Date: Fri, 6 Sep 2024 20:29:33 +0300 Subject: [PATCH] feat(tracker/gioui): cursor indicates split bars can be resized Closes #145. --- CHANGELOG.md | 5 +++++ tracker/gioui/split.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index beedf01..94e9c6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +### Added +- The vertical and horizontal split bars indicate with a cursor that they can be + resized ([#145][i145]) + ### Fixed - Assign new IDs to loaded instruments, and fix ID collisions in case they somehow still appear ([#146][i146]) @@ -178,4 +182,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). [i129]: https://github.com/vsariola/sointu/issues/129 [i130]: https://github.com/vsariola/sointu/issues/130 [i139]: https://github.com/vsariola/sointu/issues/139 +[i145]: https://github.com/vsariola/sointu/issues/145 [i146]: https://github.com/vsariola/sointu/issues/146 diff --git a/tracker/gioui/split.go b/tracker/gioui/split.go index 065b4b9..b7759f3 100644 --- a/tracker/gioui/split.go +++ b/tracker/gioui/split.go @@ -132,6 +132,11 @@ func (s *Split) Layout(gtx layout.Context, first, second layout.Widget) layout.D } area := clip.Rect(barRect).Push(gtx.Ops) event.Op(gtx.Ops, s) + if s.Axis == layout.Horizontal { + pointer.CursorColResize.Add(gtx.Ops) + } else { + pointer.CursorRowResize.Add(gtx.Ops) + } area.Pop() }