StaticcalculateCalculates optimal size of a UI element. This is the size that allows the UI element to properly display all of its content.
StaticcalculateCalculates size hint for the provided text using the provided font and size. Size is calculated without word wrap.
Text to calculate the size for.
Font to use for rendering the text.
Size of individual characters in the font, in points.
The maximum width in pixels.
Width/height required to display the text, in pixels.
StaticgenerateStatictoScales a point value by using the element's DPI scale to the current pixel value.
The element to scale a value for. This element must be attached to a valid widget in order to retrieve the scale factor. If the element is not attached to a widget, no scaling is performed.
The value to be scaled. This will effectively multiply the value by the widget scale factor.
The value in pixels.
StatictoScales a point value by using the element's DPI scale to the current pixel value.
The element used to get the DPI scaling factor.
Input value in points.
Result value in pixels.
StatictoConverts a pixel value to points by using the element's DPI scale.
The element to scale a value for. This element must be attached to a valid widget in order to retrieve the scale factor. If the element is not attached to a widget, no scaling is performed.
The value to be scaled. This will effectively multiply the value by the widget scale factor.
The value in points.
StatictoScales a point value by using the element's DPI scale to the current point value.
The element used to get the DPI scaling factor.
Result value in points.
Various helper functionality that's useful when creating UI elements.