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.

Property definitions

app $ TextView :: size=
	# 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

android :: ui $ TextView :: size=
	redef fun size=(size) do set_size_native(app.native_activity, native, size or else 1.0)
lib/android/ui/ui.nit:231,2--88

ios :: ui $ Label :: size=
	redef fun size=(size) do native.size = ios_points(size)
lib/ios/ui/ui.nit:283,2--56

linux :: ui $ Label :: size=
	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

ios :: ui $ TextInput :: size=
	redef fun size=(size) do native.size = ios_points(size)
lib/ios/ui/ui.nit:375,2--56

ios :: ui $ Button :: size=
	redef fun size=(size) do native.title_label.size = ios_points(size)
lib/ios/ui/ui.nit:416,2--68