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

iOS: Labels are cut off at bottom in vertical layout

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Duplicate
    • Affects Version/s: Release 2.1.2
    • Fix Version/s: None
    • Component/s: iOS
    • Labels:
    • Environment:

      iOS 5, Ti SDK 2.1.1, iPad

      Description

      Problem description

      Ti.UI.Label's are being cut of on the bottom in layout vertical when top is specified.

      Test case

      app.js

      var w = Ti.UI.createWindow({
      	backgroundColor:"white"
      });
       
      var container = Ti.UI.createView({
      	width:500,
      	height:250,
      	borderColor:"blue",
      	layout:"vertical"
      });
       
      var textLabel1 = Ti.UI.createLabel({
      	width:Ti.UI.FILL,
      	height:Ti.UI.SIZE,
      	// bottom:10,
      	text:"Vestibulum id ligula porta felis euismod semper.",
      	font: {
      		fontSize:24,
      		fontWeight:"bold"
      	}
      });
       
      var textLabel2 = Ti.UI.createLabel({
      	// top:10,
      	width:Ti.UI.FILL,
      	height:Ti.UI.FILL,
      	text:"Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur. Nullam quis risus eget urna mollis ornare vel eu leo. Donec sed odio dui. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. Aenean lacinia bibendum nulla sed consectetur. Maecenas sed diam eget risus varius blandit sit amet non magna. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas sed diam eget risus varius blandit sit amet non magna. Sed posuere consectetur est at lobortis."
      });
       
      container.add(textLabel1);
      container.add(textLabel2);
      w.add(container);
      w.open();
      

      If you toggle the top:10 in textLabel2 on and off you see that the label is cut off and half a line is shown.
      If you give textLabel1 a bottom instead of textLabel2 a top it looks as expected.
      If you don't use vertical layout it works as expected.

      Expected

      Labels should truncate the labels text and add ...'s.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ngupta Neeraj Gupta
                Reporter:
                gertjans Gertjan Smits
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration