Using normal cursor when control is disabled.
This commit is contained in:
parent
ea5e1a4989
commit
e7ada7fea0
@ -89,7 +89,6 @@ func (b *Button) Handle(ctx Context, e Event) bool {
|
||||
result := b.ControlBase.HandleNotify(ctx, e, b)
|
||||
if b.over {
|
||||
if b.Disabled {
|
||||
ctx.Renderer().SetMouseCursor(MouseCursorNotAllowed)
|
||||
return true
|
||||
}
|
||||
ctx.Renderer().SetMouseCursor(MouseCursorPointer)
|
||||
@ -165,7 +164,7 @@ func (b *Button) textColor(p *Palette) color.Color {
|
||||
case ButtonTypeContained:
|
||||
return p.TextOnDisabled
|
||||
}
|
||||
return p.Disabled
|
||||
return b.disabledColor(p)
|
||||
}
|
||||
if b.Font.Color != nil {
|
||||
return b.Font.Color
|
||||
|
@ -81,7 +81,6 @@ func (c *Checkbox) Handle(ctx Context, e Event) bool {
|
||||
result := c.ControlBase.Handle(ctx, e)
|
||||
if c.over {
|
||||
if c.Disabled {
|
||||
ctx.Renderer().SetMouseCursor(MouseCursorNotAllowed)
|
||||
return true
|
||||
}
|
||||
ctx.Renderer().SetMouseCursor(MouseCursorPointer)
|
||||
|
@ -166,7 +166,6 @@ func (h *sliderHandle) Handle(ctx Context, e Event) bool {
|
||||
h.ControlBase.Handle(ctx, e)
|
||||
if h.IsOver() {
|
||||
if h.Disabled {
|
||||
ctx.Renderer().SetMouseCursor(MouseCursorNotAllowed)
|
||||
return true
|
||||
}
|
||||
ctx.Renderer().SetMouseCursor(MouseCursorPointer)
|
||||
|
@ -133,7 +133,6 @@ func (b *TextBox) Handle(ctx Context, e Event) bool {
|
||||
|
||||
if b.over {
|
||||
if b.Disabled {
|
||||
ctx.Renderer().SetMouseCursor(MouseCursorNotAllowed)
|
||||
return true
|
||||
}
|
||||
ctx.Renderer().SetMouseCursor(MouseCursorText)
|
||||
|
Loading…
Reference in New Issue
Block a user