mirror of
https://github.com/vsariola/sointu.git
synced 2025-08-21 05:34:45 -04:00
fix(tracker/gioui): limit comments in unit list to single line
This commit is contained in:
parent
fe0106bb60
commit
5839471bcc
@ -18,6 +18,7 @@ type LabelStyle struct {
|
|||||||
Alignment text.Alignment
|
Alignment text.Alignment
|
||||||
Font font.Font
|
Font font.Font
|
||||||
TextSize unit.Sp
|
TextSize unit.Sp
|
||||||
|
MaxLines int
|
||||||
}
|
}
|
||||||
|
|
||||||
type LabelWidget struct {
|
type LabelWidget struct {
|
||||||
@ -32,6 +33,7 @@ func (l LabelWidget) Layout(gtx C) D {
|
|||||||
textColor := textColorMacro.Stop()
|
textColor := textColorMacro.Stop()
|
||||||
t := widget.Label{
|
t := widget.Label{
|
||||||
Alignment: l.Alignment,
|
Alignment: l.Alignment,
|
||||||
|
MaxLines: l.MaxLines,
|
||||||
}
|
}
|
||||||
if l.ShadowColor.A > 0 {
|
if l.ShadowColor.A > 0 {
|
||||||
shadowColorMacro := op.Record(gtx.Ops)
|
shadowColorMacro := op.Record(gtx.Ops)
|
||||||
|
@ -173,7 +173,7 @@ instrumenteditor:
|
|||||||
color: *disabled
|
color: *disabled
|
||||||
hintcolor: *disabled
|
hintcolor: *disabled
|
||||||
font: { style: 1 }
|
font: { style: 1 }
|
||||||
comment: { textsize: 12, color: *disabled }
|
comment: { textsize: 12, color: *disabled, maxlines: 1}
|
||||||
stack: { textsize: 12, color: *mediumemphasis, shadowcolor: *black }
|
stack: { textsize: 12, color: *mediumemphasis, shadowcolor: *black }
|
||||||
disabled: { textsize: 12, color: *disabled }
|
disabled: { textsize: 12, color: *disabled }
|
||||||
warning: *warningcolor
|
warning: *warningcolor
|
||||||
|
Reference in New Issue
Block a user