:right-sidebar: True LengthUnit =================================================================== .. currentmodule:: gi.repository.Adw .. versionadded:: 1.4 .. class:: LengthUnit :no-contents-entry: Describes length units. .. list-table:: * - Unit - Regular Text - Large Text * - ---- - ------------ - ---------- * - 1px - 1px - 1px * - 1pt - 1.333333px - 1.666667px * - 1sp - 1px - 1.25px New values may be added to this enumeration over time. Methods ------- .. rst-class:: interim-class .. class:: LengthUnit :no-index: .. method:: from_px(value: float, settings: ~gi.repository.Gtk.Settings | None = None) -> float Converts ``value`` from pixels to ``unit``\. .. versionadded:: 1.4 :param value: a value in pixels :param settings: settings to use, or ``NULL`` for default settings .. method:: to_px(value: float, settings: ~gi.repository.Gtk.Settings | None = None) -> float Converts ``value`` from ``unit`` to pixels. .. versionadded:: 1.4 :param value: a value in ``unit`` :param settings: settings to use, or ``NULL`` for default settings Fields ------ .. rst-class:: interim-class .. class:: LengthUnit :no-index: .. attribute:: PT The type of the None singleton. .. attribute:: PX The type of the None singleton. .. attribute:: SP The type of the None singleton.