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"
|
"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 {
|
type Checkbox struct {
|
||||||
// TODO provide a channel for broadcasting check changes
|
// TODO provide a channel for broadcasting check changes
|
||||||
|
|
||||||
|
@ -52,8 +52,10 @@ func (c *Checkbox) Checked() bool {
|
||||||
c.lock.Lock()
|
c.lock.Lock()
|
||||||
defer c.lock.Unlock()
|
defer c.lock.Unlock()
|
||||||
|
|
||||||
// TODO if not created
|
if c.created {
|
||||||
return c.sysData.isChecked()
|
return c.sysData.isChecked()
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Checkbox) make(window *sysData) error {
|
func (c *Checkbox) make(window *sysData) error {
|
||||||
|
|
Loading…
Reference in New Issue