Browse Source

REPORT-56014 & REPORT-56015 【组件背景分离】【下个版本】组件复用-组件边框点九图,如果线重叠了的话,web端显示有问题

【问题原因】
点九图小而组件大,且中间不可缩放的尺寸为0时,就会出现空白。从点九图的
使用机制上看无法避免上上述情况,需要在生成点九图的时候,强制中间缩放
区域的尺寸最小为1才行,即两条平行线之间的最小间距为1.

【改动思路】
同上
research/11.0
Starryi 3 years ago
parent
commit
4675f61730
  1. 17
      designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java

17
designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java

@ -487,6 +487,7 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple
private int ninePointBottom = -1; private int ninePointBottom = -1;
private static final int MIN_NINE_POINT = 0; private static final int MIN_NINE_POINT = 0;
private static final int MIN_GAP_PARALLEL_LINES = 1;
private int imgWidth; private int imgWidth;
private int imgHeight; private int imgHeight;
@ -757,8 +758,8 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple
private void onNinePointTopChanged(int value) { private void onNinePointTopChanged(int value) {
if (value < MIN_NINE_POINT) { if (value < MIN_NINE_POINT) {
value = MIN_NINE_POINT; value = MIN_NINE_POINT;
} else if (value >= imgHeight - ninePointBottom) { } else if (value >= imgHeight - ninePointBottom - MIN_GAP_PARALLEL_LINES) {
value = imgHeight - ninePointBottom - MIN_NINE_POINT; value = imgHeight - ninePointBottom - MIN_GAP_PARALLEL_LINES;
} }
this.ninePointTop = value; this.ninePointTop = value;
repaint(); repaint();
@ -767,8 +768,8 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple
private void onNinePointBottomChanged(int value) { private void onNinePointBottomChanged(int value) {
if (value < MIN_NINE_POINT) { if (value < MIN_NINE_POINT) {
value = MIN_NINE_POINT; value = MIN_NINE_POINT;
} else if (value >= imgHeight - ninePointTop) { } else if (value >= imgHeight - ninePointTop - MIN_GAP_PARALLEL_LINES) {
value = imgHeight - ninePointTop - MIN_NINE_POINT; value = imgHeight - ninePointTop - MIN_GAP_PARALLEL_LINES;
} }
this.ninePointBottom = value; this.ninePointBottom = value;
repaint(); repaint();
@ -777,8 +778,8 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple
private void onNinePointLeftChanged(int value) { private void onNinePointLeftChanged(int value) {
if (value < MIN_NINE_POINT) { if (value < MIN_NINE_POINT) {
value = MIN_NINE_POINT; value = MIN_NINE_POINT;
} else if (value >= imgWidth - ninePointRight) { } else if (value >= imgWidth - ninePointRight - MIN_GAP_PARALLEL_LINES) {
value = imgWidth - ninePointRight - MIN_NINE_POINT; value = imgWidth - ninePointRight - MIN_GAP_PARALLEL_LINES;
} }
this.ninePointLeft = value; this.ninePointLeft = value;
repaint(); repaint();
@ -787,8 +788,8 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple
private void onNinePointRightChanged(int value) { private void onNinePointRightChanged(int value) {
if (value < MIN_NINE_POINT) { if (value < MIN_NINE_POINT) {
value = MIN_NINE_POINT; value = MIN_NINE_POINT;
} else if (value >= imgWidth - ninePointLeft) { } else if (value >= imgWidth - ninePointLeft - MIN_GAP_PARALLEL_LINES) {
value = imgWidth - ninePointLeft - MIN_NINE_POINT; value = imgWidth - ninePointLeft - MIN_GAP_PARALLEL_LINES;
} }
this.ninePointRight = value; this.ninePointRight = value;
repaint(); repaint();

Loading…
Cancel
Save