Refine group, editor, and admin workflows
This commit is contained in:
@@ -3431,6 +3431,10 @@ func (u *ui) groupBar(gtx layout.Context) layout.Dimensions {
|
||||
|
||||
func detailLine(th *material.Theme, label, value string) layout.Widget {
|
||||
return func(gtx layout.Context) layout.Dimensions {
|
||||
valueSize := unit.Sp(16)
|
||||
if gtx.Constraints.Max.X <= gtx.Dp(unit.Dp(460)) {
|
||||
valueSize = unit.Sp(15)
|
||||
}
|
||||
return layout.Flex{Axis: layout.Vertical}.Layout(gtx,
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(th, unit.Sp(12), strings.ToUpper(label))
|
||||
@@ -3438,7 +3442,7 @@ func detailLine(th *material.Theme, label, value string) layout.Widget {
|
||||
return lbl.Layout(gtx)
|
||||
}),
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(th, unit.Sp(16), value)
|
||||
lbl := material.Label(th, valueSize, value)
|
||||
return lbl.Layout(gtx)
|
||||
}),
|
||||
)
|
||||
@@ -3447,6 +3451,10 @@ func detailLine(th *material.Theme, label, value string) layout.Widget {
|
||||
|
||||
func (u *ui) passwordLine(label, value string) layout.Widget {
|
||||
return func(gtx layout.Context) layout.Dimensions {
|
||||
valueSize := unit.Sp(16)
|
||||
if gtx.Constraints.Max.X <= gtx.Dp(unit.Dp(460)) {
|
||||
valueSize = unit.Sp(15)
|
||||
}
|
||||
return layout.Flex{Axis: layout.Vertical}.Layout(gtx,
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(u.theme, unit.Sp(12), strings.ToUpper(label))
|
||||
@@ -3456,7 +3464,7 @@ func (u *ui) passwordLine(label, value string) layout.Widget {
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
return layout.Flex{Alignment: layout.Middle}.Layout(gtx,
|
||||
layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(u.theme, unit.Sp(16), value)
|
||||
lbl := material.Label(u.theme, valueSize, value)
|
||||
return lbl.Layout(gtx)
|
||||
}),
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
@@ -3554,6 +3562,10 @@ func tonedButton(gtx layout.Context, th *material.Theme, click *widget.Clickable
|
||||
btn.Background, btn.Color = buttonFocusColors(false)
|
||||
btn.CornerRadius = unit.Dp(10)
|
||||
btn.TextSize = unit.Sp(15)
|
||||
if gtx.Constraints.Max.X <= gtx.Dp(unit.Dp(460)) {
|
||||
btn.TextSize = unit.Sp(14)
|
||||
btn.Inset = layout.Inset{Top: 7, Bottom: 7, Left: 10, Right: 10}
|
||||
}
|
||||
return btn.Layout(gtx)
|
||||
}
|
||||
|
||||
@@ -3562,6 +3574,10 @@ func sectionTabButton(gtx layout.Context, th *material.Theme, click *widget.Clic
|
||||
btn.CornerRadius = unit.Dp(10)
|
||||
btn.TextSize = unit.Sp(11)
|
||||
btn.Inset = layout.Inset{Top: 5, Bottom: 5, Left: 9, Right: 9}
|
||||
if gtx.Constraints.Max.X <= gtx.Dp(unit.Dp(460)) {
|
||||
btn.TextSize = unit.Sp(10)
|
||||
btn.Inset = layout.Inset{Top: 4, Bottom: 4, Left: 8, Right: 8}
|
||||
}
|
||||
if active {
|
||||
btn.Background = accentColor
|
||||
btn.Color = color.NRGBA{R: 255, G: 252, B: 247, A: 255}
|
||||
|
||||
Reference in New Issue
Block a user