Functions
Widget Scaling

Different widgets can be scaled independently. More...

Functions

double elm_config_scale_get (void)
 Get the global scaling factor. More...
 
void elm_config_scale_set (double scale)
 Set the global scaling factor. More...
 
EINA_DEPRECATED void elm_scale_all_set (double scale)
 Set the global scaling factor for all applications on the display. More...
 
void elm_object_scale_set (Evas_Object *obj, double scale)
 Set the scaling factor for a given Elementary object. More...
 
double elm_object_scale_get (const Evas_Object *obj)
 Get the scaling factor for a given Elementary object. More...
 

Detailed Description

Different widgets can be scaled independently.

These functions allow you to manipulate this scaling on a per-widget basis. The object and all its children get their scaling factors multiplied by the scale factor set. This is multiplicative, in that if a child also has a scale size set it is in turn multiplied by its parent's scale size. 1.0 means “don't scale”, 2.0 is double size, 0.5 is half, etc.

This example contemplates some of these functions.

Function Documentation

◆ elm_config_scale_get()

double elm_config_scale_get ( void  )

Get the global scaling factor.

This gets the globally configured scaling factor that is applied to all objects.

Returns
The scaling factor

◆ elm_config_scale_set()

void elm_config_scale_set ( double  scale)

Set the global scaling factor.

This sets the globally configured scaling factor that is applied to all objects.

Parameters
scaleThe scaling factor to set

References EINA_DBL_EQ, and EINA_TRUE.

◆ elm_scale_all_set()

EINA_DEPRECATED void elm_scale_all_set ( double  scale)

Set the global scaling factor for all applications on the display.

This sets the globally configured scaling factor that is applied to all objects for all applications.

Parameters
scaleThe scaling factor to set
Deprecated:
use elm_scale_set() and elm_config_all_flush()

◆ elm_object_scale_set()

void elm_object_scale_set ( Evas_Object obj,
double  scale 
)

Set the scaling factor for a given Elementary object.

Parameters
objThe Elementary to operate on
scaleScale factor (from 0.0 up, with 1.0 meaning no scaling)

References EINA_SAFETY_ON_NULL_RETURN.

◆ elm_object_scale_get()

double elm_object_scale_get ( const Evas_Object obj)

Get the scaling factor for a given Elementary object.

Parameters
objThe object
Returns
The scaling factor set by elm_object_scale_set()

References EINA_SAFETY_ON_NULL_RETURN_VAL.