Lines Matching refs:newLimits
504 WindowLimits newLimits = systemLimits;
514 newLimits.maxWidth_ = configuredMaxWidth;
517 newLimits.maxHeight_ = configuredMaxHeight;
519 if (systemLimits.minWidth_ <= configuredMinWidth && configuredMinWidth <= newLimits.maxWidth_) {
520 newLimits.minWidth_ = configuredMinWidth;
522 if (systemLimits.minHeight_ <= configuredMinHeight && configuredMinHeight <= newLimits.maxHeight_) {
523 newLimits.minHeight_ = configuredMinHeight;
527 newLimits.maxRatio_ = static_cast<float>(newLimits.maxWidth_) / static_cast<float>(newLimits.minHeight_);
528 newLimits.minRatio_ = static_cast<float>(newLimits.minWidth_) / static_cast<float>(newLimits.maxHeight_);
529 if (newLimits.minRatio_ <= customizedLimits.maxRatio_ && customizedLimits.maxRatio_ <= newLimits.maxRatio_) {
530 newLimits.maxRatio_ = customizedLimits.maxRatio_;
532 if (newLimits.minRatio_ <= customizedLimits.minRatio_ && customizedLimits.minRatio_ <= newLimits.maxRatio_) {
533 newLimits.minRatio_ = customizedLimits.minRatio_;
537 uint32_t newMaxWidth = static_cast<uint32_t>(static_cast<float>(newLimits.maxHeight_) * newLimits.maxRatio_);
538 newLimits.maxWidth_ = std::min(newMaxWidth, newLimits.maxWidth_);
539 uint32_t newMinWidth = static_cast<uint32_t>(static_cast<float>(newLimits.minHeight_) * newLimits.minRatio_);
540 newLimits.minWidth_ = std::max(newMinWidth, newLimits.minWidth_);
541 uint32_t newMaxHeight = static_cast<uint32_t>(static_cast<float>(newLimits.maxWidth_) / newLimits.minRatio_);
542 newLimits.maxHeight_ = std::min(newMaxHeight, newLimits.maxHeight_);
543 uint32_t newMinHeight = static_cast<uint32_t>(static_cast<float>(newLimits.minWidth_) / newLimits.maxRatio_);
544 newLimits.minHeight_ = std::max(newMinHeight, newLimits.minHeight_);
547 "min:%{public}u], Ratio: [max:%{public}f, min:%{public}f]", node->GetWindowId(), newLimits.maxWidth_,
548 newLimits.minWidth_, newLimits.maxHeight_, newLimits.minHeight_, newLimits.maxRatio_, newLimits.minRatio_);
549 node->SetWindowUpdatedSizeLimits(newLimits);