From 4ee355bb45b74929b5192bce47809fabb95cbc55 Mon Sep 17 00:00:00 2001 From: "5684185+vsariola@users.noreply.github.com" <5684185+vsariola@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:17:11 +0300 Subject: [PATCH] fix(tracker/gioui): DPI scaling of the numeric updown icons Closes #150. --- CHANGELOG.md | 3 +++ tracker/gioui/numericupdown.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2248e0c..ec13bd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). the command line tools. ### Fixed +- Numeric updown widget calculated dp-to-px conversion incorrectly, resulting in + wrong scaling ([#150][i150]) - Empty patch should not crash the native synth ([#148][i148]) ## [0.4.1] @@ -213,3 +215,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). [i145]: https://github.com/vsariola/sointu/issues/145 [i146]: https://github.com/vsariola/sointu/issues/146 [i148]: https://github.com/vsariola/sointu/issues/148 +[i150]: https://github.com/vsariola/sointu/issues/150 diff --git a/tracker/gioui/numericupdown.go b/tracker/gioui/numericupdown.go index 3611709..02dd989 100644 --- a/tracker/gioui/numericupdown.go +++ b/tracker/gioui/numericupdown.go @@ -128,7 +128,7 @@ func (s *NumericUpDownStyle) button(height int, icon *widget.Icon, delta int, cl size = 1 } if icon != nil { - p := gtx.Dp(unit.Dp(size)) + p := size if p < 1 { p = 1 }