Widget.Style

Style properties are defined as an accessory class so they can be referenced and overridden independently, but they are nested so you can refer to them easily by name (e.g. generic Widget.Style vs Button.Style and such).

It is here so there can be a specificity switch.

See OverrideStyle for a helper function to use your own.

Members

Functions

background
WidgetBackground background()
borderColor
Color borderColor()
cursor
MouseCursor cursor()

Returns the cursor that should be used over this widget. You may change this and updates will be reflected next time the mouse enters the widget.

font
OperatingSystemFont font()

Returns the default font to be used with this widget. The return value will be cached by the library, so you can not expect live updates.

foregroundColor
Color foregroundColor()
variesWithState
bool variesWithState(ulong dynamicStateFlags)

You must override this to trigger automatic redraws if you ever uses the dynamicState flag in your style.

Meta

History

Added May 11, 2021