Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24864

iOS: Label does not auto-size height to fit downscaled text

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: Release 6.1.1, Release 8.0.0
    • Fix Version/s: None
    • Component/s: iOS

      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

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jquick Joshua Quick
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-10810
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration