Minor improvements.

pull/216/head
Oliver 6 years ago
parent e432b27b03
commit 36893a6697

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

@ -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

@ -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.

Loading…
Cancel
Save