diff --git a/elements/basic/scrollcontainer.go b/elements/basic/scrollcontainer.go index 8d6bad1..2c5f31e 100644 --- a/elements/basic/scrollcontainer.go +++ b/elements/basic/scrollcontainer.go @@ -274,7 +274,7 @@ func (element *ScrollContainer) recalculate () { horizontal := &element.horizontal vertical := &element.vertical bounds := element.Bounds() - thickness := theme.Padding() * 2 + thickness := theme.ScrollBarWidth() // calculate child size element.childWidth = bounds.Dx() @@ -401,8 +401,8 @@ func (element *ScrollContainer) dragVerticalBar (mousePosition image.Point) { } func (element *ScrollContainer) updateMinimumSize () { - width := theme.Padding() * 2 - height := theme.Padding() * 2 + width := theme.ScrollBarWidth() + height := theme.ScrollBarWidth() if element.child != nil { childWidth, childHeight := element.child.MinimumSize() width += childWidth diff --git a/theme/theme.go b/theme/theme.go index fa82d31..24e5f31 100644 --- a/theme/theme.go +++ b/theme/theme.go @@ -32,7 +32,17 @@ var sunkenPattern = artist.NewMultiBordered ( Shadow: artist.NewUniform(hex(0x97a09cFF)), }, }, - artist.Stroke { Pattern: artist.NewUniform(hex(0x97a09cFF)) }) + // artist.Stroke { Pattern: artist.NewUniform(hex(0x97a09cFF)) }, + artist.Stroke { Pattern: artist.Striped { + First: artist.Stroke { + Weight: 2, + Pattern: artist.NewUniform(hex(0x97a09cFF)), + }, + Second: artist.Stroke { + Weight: 1, + Pattern: artist.NewUniform(hex(0x6e8079FF)), + }, + }}) var raisedPattern = artist.NewMultiBordered ( artist.Stroke { Weight: 1, Pattern: strokePattern }, @@ -109,6 +119,10 @@ func Padding () int { return 8 } +func ScrollBarWidth () int { + return Padding() * 2 +} + // SinkOffsetVector specifies a vector for things such as text to move by when a // "sinking in" effect is desired, such as a button label during a button press. func SinkOffsetVector () image.Point {