Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24130] Windows: Labels in a tableviewrow are not sized correctly

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-02-09T02:10:42.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 6.1.0
ComponentsWindows
Labelsqe-6.0.0
ReporterEwan Harris
AssigneeKota Iguchi
Created2016-11-10T15:57:45.000+0000
Updated2017-02-09T23:28:37.000+0000

Description

Description

When adding a label to a tableviewrow the label does not get sized correctly for the text
var _window = Ti.UI.createWindow();
var row1 = Ti.UI.createTableViewRow({
    // height:'auto',
    height: Ti.UI.SIZE

});
var label1 = Ti.UI.createLabel({
    // height:'auto',
    top: 0,
    height: Ti.UI.SIZE,
    text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
});

row1.add(label1);

var row2 = Ti.UI.createTableViewRow({
    // height:'auto',
    height: Ti.UI.SIZE
});
var label2 = Ti.UI.createLabel({
    // height:'auto',
    height: Ti.UI.SIZE,
    top: 0,
    text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.'
});

row2.add(label2);


var table = Ti.UI.createTableView({
    index: [{
        index: 0,
        title: 'a'
    }, {
        index: 1,
        title: 'b'
    }],
    data: [row1, row2]
});

_window.add(table);
_window.open();

Steps to reproduce

Add the code above to an existing app.js and build for Windows

Observe

Actual result

Label is not correctly sized

Expected result

Label should be correctly sized

Attachments

FileDateSize
6.0.0.GA.png2017-02-09T23:21:25.000+000058469
6.1.0.v20170209111025.png2017-02-09T23:21:25.000+000063333
ios.png2017-02-01T13:50:01.000+0000147700
windows.png2017-02-01T13:39:03.000+000041771

Comments

  1. Kota Iguchi 2017-01-31

    [~eharris] Could you help to make the issue clearer? What do you mean by "correctly sized" in particular? I see the issue is that right-edge of the Label is cut off and character is not displayed partially, but I would like to make sure what needs to be fixed in particular for this ticket, just in case. Thanks!
  2. Ewan Harris 2017-01-31

    [~kota] Yeah this ticket is awful.. sorry about that :). Yeah the issue was for the sizing of the label and the text being cut off, I'm attaching screenshots of Windows and iOS as a reference for the future
  3. Kota Iguchi 2017-02-01

    https://github.com/appcelerator/titanium_mobile_windows/pull/942
  4. Samir Mohammed 2017-02-09

    Verified fixed with the test case provided, text is no longer cut off and characters are displayed correctly. 6.0.0.GA: !6.0.0.GA.png|thumbnail! 6.1.0.v20170209111025: !6.1.0.v20170209111025.png|thumbnail! *Environment *
       Windows Emulator: 10.0.14393
       Phone : Lumia 640 LTE (RM-1073)
       Operating System:
       Name                        = Microsoft Windows 10 Pro
       Version                     = 10.0.14393
       Architecture                = 32bit
       

    CPUs = 4

    Memory = 17034395648 Node.js: Node.js Version = 4.6.0 npm Version = 2.15.9 Titanium SDK: SDK Version = 6.1.0.v20170209111025

JSON Source