From ca4a98eb509fb260e3ab5f7137b311f4e4764ce8 Mon Sep 17 00:00:00 2001 From: "5684185+vsariola@users.noreply.github.com" <5684185+vsariola@users.noreply.github.com> Date: Sat, 17 Feb 2024 19:01:56 +0200 Subject: [PATCH] fix(gioui): reduce the default height of popup menus so they fit Closes #121. --- CHANGELOG.md | 3 +++ tracker/gioui/menu.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8adc0bc..6d9c9b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - 32-bit su_load_gmdls clobbered ebx, even though __stdcall demands it to be not touched - Spaces are allowed in instrument names (#120) +- Reduce the default height of popup menus so they fit on screen (fixes #121: + "The dropdown for targeting sends can make it impossible to choose certain + ops") ## v0.3.0 ### Added diff --git a/tracker/gioui/menu.go b/tracker/gioui/menu.go index e373eba..ce95e45 100644 --- a/tracker/gioui/menu.go +++ b/tracker/gioui/menu.go @@ -177,7 +177,7 @@ func (tr *Tracker) layoutMenu(title string, clickable *widget.Clickable, menu *M dims := titleBtn.Layout(gtx) op.Offset(image.Pt(0, dims.Size.Y)).Add(gtx.Ops) gtx.Constraints.Max.X = gtx.Dp(width) - gtx.Constraints.Max.Y = gtx.Dp(unit.Dp(1000)) + gtx.Constraints.Max.Y = gtx.Dp(unit.Dp(300)) m.Layout(gtx, items...) return dims }