From 5839471bccdccbbbb9a0068ae8659b3f9bc0ea72 Mon Sep 17 00:00:00 2001 From: "5684185+vsariola@users.noreply.github.com" <5684185+vsariola@users.noreply.github.com> Date: Wed, 30 Jul 2025 18:10:15 +0300 Subject: [PATCH] fix(tracker/gioui): limit comments in unit list to single line --- tracker/gioui/label.go | 2 ++ tracker/gioui/theme.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tracker/gioui/label.go b/tracker/gioui/label.go index 73cd332..bb51200 100644 --- a/tracker/gioui/label.go +++ b/tracker/gioui/label.go @@ -18,6 +18,7 @@ type LabelStyle struct { Alignment text.Alignment Font font.Font TextSize unit.Sp + MaxLines int } type LabelWidget struct { @@ -32,6 +33,7 @@ func (l LabelWidget) Layout(gtx C) D { textColor := textColorMacro.Stop() t := widget.Label{ Alignment: l.Alignment, + MaxLines: l.MaxLines, } if l.ShadowColor.A > 0 { shadowColorMacro := op.Record(gtx.Ops) diff --git a/tracker/gioui/theme.yml b/tracker/gioui/theme.yml index 4c89fdc..1ad253c 100644 --- a/tracker/gioui/theme.yml +++ b/tracker/gioui/theme.yml @@ -173,7 +173,7 @@ instrumenteditor: color: *disabled hintcolor: *disabled font: { style: 1 } - comment: { textsize: 12, color: *disabled } + comment: { textsize: 12, color: *disabled, maxlines: 1} stack: { textsize: 12, color: *mediumemphasis, shadowcolor: *black } disabled: { textsize: 12, color: *disabled } warning: *warningcolor