Added double click delay to config
This commit is contained in:
@@ -238,6 +238,10 @@ func (element *Directory) partition () {
|
||||
}
|
||||
}
|
||||
|
||||
func (element *Directory) Window () tomo.Window {
|
||||
return element.core.Window()
|
||||
}
|
||||
|
||||
// NotifyMinimumSizeChange notifies the container that the minimum size of a
|
||||
// child element has changed.
|
||||
func (element *Directory) NotifyMinimumSizeChange (child tomo.Element) {
|
||||
|
||||
@@ -132,7 +132,7 @@ func (element *File) HandleMouseUp (x, y int, button input.Button) {
|
||||
element.pressed = false
|
||||
within := image.Point { x, y }.
|
||||
In(element.Bounds())
|
||||
if time.Since(element.lastClick) < time.Second / 2 {
|
||||
if time.Since(element.lastClick) < element.config.DoubleClickDelay() {
|
||||
if element.Enabled() && within && element.onChoose != nil {
|
||||
element.onChoose()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user