mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
fix(tracker): click on hex track low/high nibble selects that nibble
Closes #160
This commit is contained in:
parent
5099c61705
commit
7470413ad8
@ -146,13 +146,11 @@ func (s *ScrollTableStyle) handleEvents(gtx layout.Context, p image.Point) {
|
||||
if e.Kind == pointer.Press {
|
||||
gtx.Execute(key.FocusCmd{Tag: s.ScrollTable})
|
||||
}
|
||||
dx := (int(e.Position.X) + s.ScrollTable.ColTitleList.List.Position.Offset) / gtx.Dp(s.CellWidth)
|
||||
dy := (int(e.Position.Y) + s.ScrollTable.RowTitleList.List.Position.Offset) / gtx.Dp(s.CellHeight)
|
||||
x := dx + s.ScrollTable.ColTitleList.List.Position.First
|
||||
y := dy + s.ScrollTable.RowTitleList.List.Position.First
|
||||
s.ScrollTable.Table.SetCursor(
|
||||
tracker.Point{X: x, Y: y},
|
||||
)
|
||||
dx := (e.Position.X + float32(s.ScrollTable.ColTitleList.List.Position.Offset)) / float32(gtx.Dp(s.CellWidth))
|
||||
dy := (e.Position.Y + float32(s.ScrollTable.RowTitleList.List.Position.Offset)) / float32(gtx.Dp(s.CellHeight))
|
||||
x := dx + float32(s.ScrollTable.ColTitleList.List.Position.First)
|
||||
y := dy + float32(s.ScrollTable.RowTitleList.List.Position.First)
|
||||
s.ScrollTable.Table.SetCursorFloat(x, y)
|
||||
if !e.Modifiers.Contain(key.ModShift) {
|
||||
s.ScrollTable.Table.SetCursor2(s.ScrollTable.Table.Cursor())
|
||||
}
|
||||
|
Reference in New Issue
Block a user