Fix object code

This commit is contained in:
2024-09-12 02:34:28 -04:00
parent dca3880a87
commit c2245ec304
7 changed files with 31 additions and 26 deletions

View File

@@ -172,14 +172,14 @@ func (this *Scrollbar) handleKeyDown (key input.Key, numpad bool) bool {
switch key {
case input.KeyUp, input.KeyLeft:
if modifiers.Alt {
if modifiers.Alt() {
this.SetValue(0)
} else {
this.scrollBy(this.StepSize())
}
return true
case input.KeyDown, input.KeyRight:
if modifiers.Alt {
if modifiers.Alt() {
this.SetValue(1)
} else {
this.scrollBy(-this.StepSize())
@@ -320,12 +320,13 @@ func (this *Scrollbar) newLinkCookie (subCookies ...event.Cookie) *scrollbarCook
}
}
func (this *scrollbarCookie) Close () {
func (this *scrollbarCookie) Close () error {
for _, cookie := range this.subCookies {
cookie.Close()
}
this.owner.layout.linked = nil
this.owner.box.SetAttr(tomo.ALayout(this.owner.layout))
return nil
}
type scrollbarLayout struct {