diff --git a/scrollbar.go b/scrollbar.go index 28f66eb..7ece407 100644 --- a/scrollbar.go +++ b/scrollbar.go @@ -9,7 +9,7 @@ import "git.tebibyte.media/tomo/tomo/event" // overflowing ContainerBox. type Scrollbar struct { tomo.ContainerBox - handle *SliderHandle + handle *sliderHandle layout scrollbarLayout dragging bool dragOffset image.Point @@ -24,7 +24,7 @@ type Scrollbar struct { func newScrollbar (orient string) *Scrollbar { this := &Scrollbar { ContainerBox: tomo.NewContainerBox(), - handle: &SliderHandle { + handle: &sliderHandle { Box: tomo.NewBox(), }, layout: scrollbarLayout { diff --git a/slider.go b/slider.go index a8156f6..71001f8 100644 --- a/slider.go +++ b/slider.go @@ -9,7 +9,7 @@ import "git.tebibyte.media/tomo/tomo/event" // Slider is a control that selects a numeric value between 0 and 1. type Slider struct { tomo.ContainerBox - handle *SliderHandle + handle *sliderHandle layout sliderLayout dragging bool dragOffset image.Point @@ -21,16 +21,14 @@ type Slider struct { } } -// SliderHandle is a simple object that serves as a handle for sliders and -// scrollbars. It is completely inert. -type SliderHandle struct { +type sliderHandle struct { tomo.Box } func newSlider (orient string, value float64) *Slider { this := &Slider { ContainerBox: tomo.NewContainerBox(), - handle: &SliderHandle { + handle: &sliderHandle { Box: tomo.NewBox(), }, layout: sliderLayout {