Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24883] Windows: Incorrect child view size when parent view has border

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-07-27T13:18:56.000+0000
Affected Version/sRelease 6.1.0
Fix Version/sRelease 6.2.0
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2017-06-23T04:06:19.000+0000
Updated2017-08-14T11:13:42.000+0000

Description

When parent View has border, child Views calculates its position and size based on parent border.
var win = Ti.UI.createWindow(),
    view0 = Ti.UI.createView({
        top: 20,
        bottom: 20,
        left: 20,
        right: 20,
        borderColor: 'blue',
        borderWidth: 1,
        backgroundColor: 'white'
    }),
    view = Ti.UI.createView({
        top: 10,
        bottom: 10,
        left: 10,
        right: 10,
        borderColor: 'green',
        borderWidth: 10,
        backgroundColor: 'red'
    });
view.add(view0);

win.add(view);
win.open();
*Actual* !actual.png|thumbnail! *Expected (iOS)* !expected.png|thumbnail!

Attachments

FileDateSize
actual.png2017-06-23T04:05:56.000+000010990
expected.png2017-06-23T04:05:55.000+00003788

Comments

  1. Kota Iguchi 2017-06-29

    https://github.com/appcelerator/titanium_mobile_windows/pull/1025
  2. Ewan Harris 2017-07-27

    6_2_X backport merged in https://github.com/appcelerator/titanium_mobile_windows/pull/1048 Awaiting the build before closing
  3. Ewan Harris 2017-08-14

    Verified in 6.2.0.v20170811022027

JSON Source