mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
layout,app: [API] rename FrameEvent.Queue and Context.Queue to Source
We're about to replace the interface Queue with a concrete input.Source. This change renames the field accordingly. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -133,7 +133,7 @@ func (b ButtonLayoutStyle) Layout(gtx layout.Context, w layout.Widget) layout.Di
|
||||
defer clip.UniformRRect(image.Rectangle{Max: gtx.Constraints.Min}, rr).Push(gtx.Ops).Pop()
|
||||
background := b.Background
|
||||
switch {
|
||||
case gtx.Queue == nil:
|
||||
case gtx.Source == nil:
|
||||
background = f32color.Disabled(b.Background)
|
||||
case b.Button.Hovered() || b.Button.Focused():
|
||||
background = f32color.Hovered(b.Background)
|
||||
@@ -165,7 +165,7 @@ func (b IconButtonStyle) Layout(gtx layout.Context) layout.Dimensions {
|
||||
defer clip.UniformRRect(image.Rectangle{Max: gtx.Constraints.Min}, rr).Push(gtx.Ops).Pop()
|
||||
background := b.Background
|
||||
switch {
|
||||
case gtx.Queue == nil:
|
||||
case gtx.Source == nil:
|
||||
background = f32color.Disabled(b.Background)
|
||||
case b.Button.Hovered() || b.Button.Focused():
|
||||
background = f32color.Hovered(b.Background)
|
||||
|
||||
@@ -60,7 +60,7 @@ func (c *checkable) layout(gtx layout.Context, checked, hovered bool) layout.Dim
|
||||
return layout.UniformInset(2).Layout(gtx, func(gtx layout.Context) layout.Dimensions {
|
||||
size := gtx.Dp(c.Size)
|
||||
col := c.IconColor
|
||||
if gtx.Queue == nil {
|
||||
if gtx.Source == nil {
|
||||
col = f32color.Disabled(col)
|
||||
}
|
||||
gtx.Constraints.Min = image.Point{X: size}
|
||||
|
||||
@@ -61,7 +61,7 @@ func (e EditorStyle) Layout(gtx layout.Context) layout.Dimensions {
|
||||
paint.ColorOp{Color: e.HintColor}.Add(gtx.Ops)
|
||||
hintColor := hintColorMacro.Stop()
|
||||
selectionColorMacro := op.Record(gtx.Ops)
|
||||
paint.ColorOp{Color: blendDisabledColor(gtx.Queue == nil, e.SelectionColor)}.Add(gtx.Ops)
|
||||
paint.ColorOp{Color: blendDisabledColor(gtx.Source == nil, e.SelectionColor)}.Add(gtx.Ops)
|
||||
selectionColor := selectionColorMacro.Stop()
|
||||
|
||||
var maxlines int
|
||||
|
||||
@@ -51,7 +51,7 @@ func (p ProgressBarStyle) Layout(gtx layout.Context) layout.Dimensions {
|
||||
layout.Stacked(func(gtx layout.Context) layout.Dimensions {
|
||||
fillWidth := int(float32(progressBarWidth) * clamp1(p.Progress))
|
||||
fillColor := p.Color
|
||||
if gtx.Queue == nil {
|
||||
if gtx.Source == nil {
|
||||
fillColor = f32color.Disabled(fillColor)
|
||||
}
|
||||
return shader(fillWidth, fillColor)
|
||||
|
||||
@@ -56,7 +56,7 @@ func (s SliderStyle) Layout(gtx layout.Context) layout.Dimensions {
|
||||
trans.Pop()
|
||||
|
||||
color := s.Color
|
||||
if gtx.Queue == nil {
|
||||
if gtx.Source == nil {
|
||||
color = f32color.Disabled(color)
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ func (s SwitchStyle) Layout(gtx layout.Context) layout.Dimensions {
|
||||
if s.Switch.Value {
|
||||
col = s.Color.Enabled
|
||||
}
|
||||
if gtx.Queue == nil {
|
||||
if gtx.Source == nil {
|
||||
col = f32color.Disabled(col)
|
||||
}
|
||||
trackColor := s.Color.Track
|
||||
|
||||
Reference in New Issue
Block a user