Minor improvements.

This commit is contained in:
Oliver 2018-12-26 21:24:39 +01:00
parent e432b27b03
commit 36893a6697
3 changed files with 7 additions and 1 deletions

View File

@ -218,6 +218,7 @@ EventLoop:
if inputCapture != nil {
event = inputCapture(event)
if event == nil {
a.draw()
continue // Don't forward event.
}
}

6
box.go
View File

@ -106,7 +106,11 @@ func (b *Box) GetInnerRect() (int, int, int, int) {
height - b.paddingTop - b.paddingBottom
}
// SetRect sets a new position of the primitive.
// SetRect sets a new position of the primitive. Note that this has no effect
// if this primitive is part of a layout (e.g. Flex, Grid) or if it was added
// like this:
//
// application.SetRoot(b, true)
func (b *Box) SetRect(x, y, width, height int) {
b.x = x
b.y = y

1
doc.go
View File

@ -21,6 +21,7 @@ The package implements the following widgets:
- Form: Forms composed of input fields, drop down selections, checkboxes, and
buttons.
- Modal: A centered window with a text message and one or more buttons.
- Grid: A grid based layout manager.
- Flex: A Flexbox based layout manager.
- Pages: A page based layout manager.