Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24864] iOS: Label does not auto-size height to fit downscaled text

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 6.1.1, Release 8.0.0
Fix Version/sn/a
ComponentsiOS
LabelsengSchedule, ios, label, ui
ReporterJoshua Quick
AssigneeUnknown
Created2017-06-20T17:43:08.000+0000
Updated2019-05-14T15:35:08.000+0000

Description

*Summary:* When using a Label's "minimumFontSize" feature to downscale the text to fit the view's width, the height of the view does not automatically resize itself to fit the text when downscaled. *Reproducible Case:* Run the following code on iOS...
var window = Ti.UI.createWindow({ backgroundColor: "gray" });
window.add(Ti.UI.createLabel({
	text: "Hello World!",
	color: "white",
	backgroundColor: "black",
	font: { fontSize: 200 },
	minimumFontSize: 10,
	width: "80%",
	height: Ti.UI.SIZE,
}));
window.open();
*Result:* The height of the label view is the size of the default font size instead of the downscaled font size its actually using. This can be identified by the black background the label is using. *Expected Result:* The height should match the font size the label is currently using to render its text.

Attachments

FileDateSize
Screenshot.png2017-06-20T17:47:03.000+000044202

Comments

No comments

JSON Source