Class CursorScale

Class Documentation

class CursorScale

Allows for the configuration of the cursor’s scale at runtime.

Remark

Since MirAL 5.3

Public Functions

explicit CursorScale()

Construct a cursor scale with a scale of 1 by default.

explicit CursorScale(live_config::Store &config_store)

Construct registering with a configuration store.

Available options:

  • {cursor, scale}: Scales the cursor by the provided scale. Must be between 0 and 100 inclusive.

Remark

Since Miral 5.5

Parameters:

config_store – the config store

explicit CursorScale(float default_scale)

Construct a cursor scale with a default scale.

The scale is clamped between 0 and 100, inclusive.

Parameters:

default_scale – the default scale

~CursorScale()
void scale(float new_scale) const

Applies a new scale, either immediately or when the server starts.

The scale is clamped between 0 and 100, inclusive.

Parameters:

new_scale – the new scale

void operator()(mir::Server &server) const