feat(tracker/gioui): rework the labels of numeric updowns

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-04-27 09:07:46 +03:00
parent d0413e0a13
commit 42c95ab8ee
5 changed files with 49 additions and 70 deletions

View File

@ -110,14 +110,14 @@ func (s *NumericUpDownStyle) Update(gtx layout.Context) {
}
}
func (s *NumericUpDownStyle) Layout(gtx C) D {
func (s NumericUpDownStyle) Layout(gtx C) D {
if s.Tooltip.Text.Text != "" {
return s.NumberInput.tipArea.Layout(gtx, s.Tooltip, s.actualLayout)
}
return s.actualLayout(gtx)
}
func (s NumericUpDownStyle) actualLayout(gtx C) D {
func (s *NumericUpDownStyle) actualLayout(gtx C) D {
s.Update(gtx)
gtx.Constraints = layout.Exact(image.Pt(gtx.Dp(s.Width), gtx.Dp(s.Height)))
width := gtx.Dp(s.ButtonWidth)