Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5516] MobileWeb: Incorrect paddings in Button object

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-09-22T00:24:13.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.2
ComponentsMobileWeb
Labelsqe-testadded
ReporterMisha Vasko
AssigneeNeeraj Gupta
Created2011-08-10T09:35:07.000+0000
Updated2014-07-22T10:18:51.000+0000

Description

Incorrect paddings in Button object. When width of the button is small the align of the title is not center.
var win = Ti.UI.currentWindow;
win.backgroundColor = '#EEE';

var b1 = Ti.UI.createButton({
	title: 'Button',
	top: 10,
	left: 10,
	height: 40,
	width: 47,
	backgroundColor: '#888'
});

win.add(b1);
Expected behavior: title of the button should be in the center of the button. Actual result: space between left border of button and first letter of title is bigger than space between last letter of title and right border of button.

Comments

  1. Andrew Kulinich 2011-09-08

    please provide more details. Especially expected result and code to reproduce
  2. Andrew Kulinich 2011-09-13

    please provide an example, avtual result and expected results
  3. Lokesh Choudhary 2012-08-28

    Verified fix on: Titanium studio : 2.1.1.201207271312 SDK version : 2.2.0.v20120827143312 Chrome 21.0.xx Firefox 15 Safari 6.0 Android 4.0.4 default browser,chrome 18.0.xx ,firefox 15.0 Iphone 5.0.1 mobile safari

JSON Source