Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Update docstring on Padder #91

Merged
merged 1 commit into from
Dec 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions padder.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ import "image"
var _ Widget = &Padder{}

// Padder is a widget to fill out space.
// It adds empty space of a specified size to the outside of its contained Widget.
type Padder struct {
widget Widget

padding image.Point
}

// NewPadder returns a new Padder.
// The enclosed Widget is given horizontal margin of x on the right and x on the left,
// and a vertical margin of y on the top and y on the bottom.
func NewPadder(x, y int, w Widget) *Padder {
return &Padder{
widget: w,
Expand Down