Center Example
This example demonstrates the Center widget, which positions a child widget in the center of the available area.
Key Concepts
-
Centering: The widget automatically calculates the necessary padding to center its child.
-
Sizing: You can control the size of the centered area using
width_percentandheight_percent. -
Composition: The
Centerwidget wraps another widget (the child), making it easy to compose layouts.
Controls
| Key | Action |
|---|---|
← / → |
Decrease / Increase width percentage |
↑ / ↓ |
Increase / Decrease height percentage |
q |
Quit |
