Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-11269] Kitchen sink:Base UI:Window Properties->Toggling height/wi... #3582

Merged
merged 10 commits into from
Dec 19, 2012
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -454,14 +454,25 @@ public void processProperties(KrollDict d)
}

@Override
public void propertyChanged(String key, Object oldValue, Object newValue, KrollProxy proxy)
public void propertyChanged(String key, Object oldValue, Object newValue, KrollProxy windowProxy)
{
//
// Special case where where the windowProxy arg here does not match our underlying proxy.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo "where where"

// (windowProxy is TiBaseWindowProxy, but underlying proxy is ActivityWindowProxy).
// If that's true, then windowProxy has the new value but our proxy member does not,
// so we set it here. TIMOB-11269.
//
if (windowProxy != proxy)
{
proxy.setProperty(key, newValue);
}

if (key.equals(TiC.PROPERTY_BACKGROUND_IMAGE)) {
if (newValue != null) {
handleBackgroundImage(newValue, false);

} else {
handleBackgroundColor(proxy.getProperty(TiC.PROPERTY_BACKGROUND_COLOR), false);
handleBackgroundColor(windowProxy.getProperty(TiC.PROPERTY_BACKGROUND_COLOR), false);
}

} else if (key.equals(TiC.PROPERTY_BACKGROUND_COLOR)) {
Expand Down Expand Up @@ -502,7 +513,7 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP
windowActivity.setTitle(title);

} else {
proxy.getActivity().setTitle(title);
windowProxy.getActivity().setTitle(title);
}

} else if (key.equals(TiC.PROPERTY_LAYOUT)) {
Expand All @@ -525,7 +536,7 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP
handleWindowPixelFormat(TiConvert.toInt(newValue));

} else {
super.propertyChanged(key, oldValue, newValue, proxy);
super.propertyChanged(key, oldValue, newValue, windowProxy);
}
}

Expand Down