Browse Source

REPORT-53175【10.0.18】组件背景分离为标题/背景/边框

子功能: 设计器绝对布局内可锁定组件宽高比例

绝对布局未锁定尺寸比例,但其内部子组件锁定了尺寸比例,此时
改变绝对布局的尺寸,其内部组件应该保持原有的尺寸比例. 根据规则,
其内部组件选择宽度和高度中较小的缩放比例,缩放其尺寸.
feature/10.0
Starryi 3 years ago
parent
commit
43efd3c46f
  1. 4
      designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java

4
designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java

@ -203,6 +203,10 @@ public class XWAbsoluteLayout extends XLayoutContainer {
double percentH = ((double) backupBound.height / (double) currentBound.height);
for (int index = 0, n = this.getComponentCount(); index < n; index++) {
XCreator creator = (XCreator) this.getComponent(index);
if (creator.toData().isAspectRatioLocked()) {
double percent = Math.min(percentW, percentH);
percentW = percentH = percent;
}
BoundsWidget wgt = (BoundsWidget) layout.getBoundsWidget(creator.toData());
// 用当前的显示大小计算后调正具体位置
Rectangle wgtBound = creator.getBounds();

Loading…
Cancel
Save