internal bool ScaleUpInternal() { // If there is no previous scale index, we start at the zeroth index if (_lastScalingIndex == -2) { ScaleMaxInternal(); return(true); } // We are already at the Max Scale so there is nothing to do if (_lastScalingIndex == -1) { return(false); } List <ScalingStep> steps = _scalingInfo.StepsInternal; ScalingStep step = (ScalingStep)steps[_lastScalingIndex]; Group group = (Group)GetChild(step.GroupId); // We pass "null" for the PopupSize because we are scaling to the previous layout // This implies that it is not the smallest one and therefore hopefully not a popup. // If it is a popup, then passing in null like this will simply cause us to use // the default popup size for this scaling template. // The scenario that we are punting on here then is default popup sizes for popup // scale steps that are not the last one in the scaling sequence for a group. // This will practially never happen and even if it does, we'll just fall back // the the default behavior. O14:611435 group.SelectLayout(step.PreviousLayoutName, null); // Update the step that we are on _lastScalingIndex--; return(true); }
internal bool ScaleDownInternal() { // If there is no previous scale index, we start at the zeroth index if (_lastScalingIndex == -2) { ScaleMax(); return(true); } List <ScalingStep> steps = _scalingInfo.StepsInternal; // If we are already at the smallest scale, then return. if (steps.Count <= _lastScalingIndex + 1) { return(false); } // Go down one scale smaller _lastScalingIndex++; ScalingStep step = (ScalingStep)steps[_lastScalingIndex]; Group group = (Group)GetChild(step.GroupId); #if DEBUG // Hack to disable these alert in Ja-Jp Pseudo builds - O14:628489 if (!(Title.StartsWith("[") && Title.EndsWith("]"))) { if (step.HasScaleWarning) { Browser.Window.Alert("Tab Scale Warning hit for:\nTab: " + Id + "\nGroup: " + group.Id + "\nSize: " + step.LayoutName + "\nMessage: " + step.ScaleWarningMessage); } } #endif group.SelectLayout(step.LayoutName, step.PopupSize); return(true); }