Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14576] BlackBerry: Can not return deferWidth or deferHeight to true if width or height is initially fixed value type.

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionHold
Resolution Date2015-04-14T17:12:38.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsBlackBerry
Labelsn/a
ReporterRussell McMahon
AssigneePedro Enrique
Created2013-07-16T23:01:00.000+0000
Updated2017-03-16T20:25:20.000+0000

Description

In NativeControlObject to be able to front-end the layout engine when width or height is adjusted by margins some flags control how width and height are processed. The problem is when a width or height value is of type "fixed" for example a width: 50, height: 50 like for labels, buttons, and defer type controls then the deferWidth or deferHeight is set to false and can not be set back to true. The fix is to evaluate the width, height top and bottom property and reset if it's "SIZE" or the width or height is to be calculated by the engine.
int NativeControlObject::setWidth(TiObject* obj)
{
	string str = *String::Utf8Value(obj->getValue());

	if (str == "auto") {
		return NATIVE_ERROR_OK;
	}

	if (deferWidth_ && str == "UI.SIZE") {
		deferWidthType_ = Size;
		return NATIVE_ERROR_OK;
	}

	deferWidth_ = false;
	updateLayoutProperty(Width, obj);

	return NATIVE_ERROR_OK;
}

Comments

  1. Ingo Muschenetz 2015-04-14

    Placing these items on hold for the moment based on community interest.
  2. Lee Morris 2017-03-16

    Closing ticket as BlackBerry is no longer supported by us.

JSON Source