Noah Petherbridge
8624a28ea9
* Added `BoxSize()` to Widget that reports the full box size including borders and margin. * The Frame uses the `BoxSize()` of widgets to position them. Reintroduces some padding issues (boxes on the GUI Test stick out of bounds a bit) but is on the right track. * Renamed `Padding` to `Margin` on the Widget object, since the Margin is taken into consideration along with Outline and Border in computing the widget's BoxSize. * Restructured the Label widget to take a Text or TextVariable property and the font settings (render.Text) are in a new `Font` property.
27 lines
584 B
Go
27 lines
584 B
Go
package balance
|
|
|
|
import (
|
|
"git.kirsle.net/apps/doodle/render"
|
|
)
|
|
|
|
// Shell related variables.
|
|
var (
|
|
// TODO: why not renders transparent
|
|
ShellBackgroundColor = render.RGBA(0, 10, 20, 128)
|
|
ShellForegroundColor = render.White
|
|
ShellPadding int32 = 8
|
|
ShellFontSize = 16
|
|
ShellCursorBlinkRate uint64 = 20
|
|
ShellHistoryLineCount = 8
|
|
|
|
// Ticks that a flashed message persists for.
|
|
FlashTTL uint64 = 400
|
|
)
|
|
|
|
// StatusFont is the font for the status bar.
|
|
var StatusFont = render.Text{
|
|
Size: 12,
|
|
Padding: 4,
|
|
Color: render.Black,
|
|
}
|