From 0fe49794831bc80bca18eab1afc220aaa25366f7 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Fri, 16 Aug 2024 18:35:19 -0400 Subject: [PATCH] Un-export SliderHandle Closes #8 --- scrollbar.go | 4 ++-- slider.go | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) 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 {