Removed a TODO in Checkbox and made its behavior more precise.
This commit is contained in:
parent
f8ec4b6305
commit
d07d0f481a
|
@ -5,7 +5,7 @@ import (
|
|||
"sync"
|
||||
)
|
||||
|
||||
// A Checkbox is a clickable square with a label. The square can be either checked or unchecked.
|
||||
// A Checkbox is a clickable square with a label. The square can be either checked or unchecked. Checkboxes start out unchecked.
|
||||
type Checkbox struct {
|
||||
// TODO provide a channel for broadcasting check changes
|
||||
|
||||
|
@ -52,9 +52,11 @@ func (c *Checkbox) Checked() bool {
|
|||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
|
||||
// TODO if not created
|
||||
if c.created {
|
||||
return c.sysData.isChecked()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (c *Checkbox) make(window *sysData) error {
|
||||
c.lock.Lock()
|
||||
|
|
Loading…
Reference in New Issue