Browse Source

REPORT-55114 【组件背景分离】组件复用-点九图分割线拖动到边缘时,就无法再次选中分割线了

【问题原因】
整数计算导致的比例比较错误,图片在宽度上显示不全导致的
【改动思路】
【review建议】
feature/10.0
Starryi 4 years ago
parent
commit
e03d834888
  1. 2
      designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java

2
designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java

@ -473,7 +473,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver {
int autoFixAreaX = PADDING; int autoFixAreaX = PADDING;
int autoFixAreaY = PADDING; int autoFixAreaY = PADDING;
if (imgWidth / imgHeight > autoFixAreaWidth / autoFixAreaHeight) { if ((imgWidth * 1.0F / imgHeight) > (autoFixAreaWidth * 1.0F / autoFixAreaHeight)) {
scaleImgWidth = autoFixAreaWidth; scaleImgWidth = autoFixAreaWidth;
scaleImgHeight = (int) (1.0F * scaleImgWidth * imgHeight / imgWidth); scaleImgHeight = (int) (1.0F * scaleImgWidth * imgHeight / imgWidth);
scaleImgX = autoFixAreaX; scaleImgX = autoFixAreaX;

Loading…
Cancel
Save