A value of 1.0, the default, use the platform default text size. Values under 1.0 set a smaller text size, and over 1.0 a larger size.
Implementation varies per platform, and some controls may be unaffected
depending on the customization options of each platform.
For consistent results, it is recommended to use only on instances
of Label
and size
should be either 0.5, 1.0 or 1.5.
# Set the relative size of the text
#
# A value of 1.0, the default, use the platform default text size.
# Values under 1.0 set a smaller text size, and over 1.0 a larger size.
#
# Implementation varies per platform, and some controls may be unaffected
# depending on the customization options of each platform.
# For consistent results, it is recommended to use only on instances
# of `Label` and `size` should be either 0.5, 1.0 or 1.5.
fun size=(size: nullable Float) is autoinit do end
lib/app/ui.nit:237,2--246,51
redef fun size=(size)
do
if size == null or size == 1.0 then
pango_markup_format = "\%s"
else if size < 1.0 then
pango_markup_format = "<span size=\"small\">\%s</span>"
else#if size > 1.0 then
pango_markup_format = "<span size=\"large\">\%s</span>"
end
# Force reloading `text`
text = text
end
lib/linux/ui.nit:283,2--295,4