From 4675f617303d561c185ccfdda7e354ae630e0081 Mon Sep 17 00:00:00 2001 From: Starryi Date: Thu, 16 Sep 2021 16:59:50 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-56014=20&=20REPORT-56015=20=E3=80=90?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=83=8C=E6=99=AF=E5=88=86=E7=A6=BB=E3=80=91?= =?UTF-8?q?=E3=80=90=E4=B8=8B=E4=B8=AA=E7=89=88=E6=9C=AC=E3=80=91=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=A4=8D=E7=94=A8-=E7=BB=84=E4=BB=B6=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E7=82=B9=E4=B9=9D=E5=9B=BE=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E7=BA=BF=E9=87=8D=E5=8F=A0=E4=BA=86=E7=9A=84=E8=AF=9D=EF=BC=8C?= =?UTF-8?q?web=E7=AB=AF=E6=98=BE=E7=A4=BA=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 点九图小而组件大,且中间不可缩放的尺寸为0时,就会出现空白。从点九图的 使用机制上看无法避免上上述情况,需要在生成点九图的时候,强制中间缩放 区域的尺寸最小为1才行,即两条平行线之间的最小间距为1. 【改动思路】 同上 --- .../gui/style/TranslucentBorderSpecialPane.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java b/designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java index 237a5659a7..0de98c3b5f 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java +++ b/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 static final int MIN_NINE_POINT = 0; + private static final int MIN_GAP_PARALLEL_LINES = 1; private int imgWidth; private int imgHeight; @@ -757,8 +758,8 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple private void onNinePointTopChanged(int value) { if (value < MIN_NINE_POINT) { value = MIN_NINE_POINT; - } else if (value >= imgHeight - ninePointBottom) { - value = imgHeight - ninePointBottom - MIN_NINE_POINT; + } else if (value >= imgHeight - ninePointBottom - MIN_GAP_PARALLEL_LINES) { + value = imgHeight - ninePointBottom - MIN_GAP_PARALLEL_LINES; } this.ninePointTop = value; repaint(); @@ -767,8 +768,8 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple private void onNinePointBottomChanged(int value) { if (value < MIN_NINE_POINT) { value = MIN_NINE_POINT; - } else if (value >= imgHeight - ninePointTop) { - value = imgHeight - ninePointTop - MIN_NINE_POINT; + } else if (value >= imgHeight - ninePointTop - MIN_GAP_PARALLEL_LINES) { + value = imgHeight - ninePointTop - MIN_GAP_PARALLEL_LINES; } this.ninePointBottom = value; repaint(); @@ -777,8 +778,8 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple private void onNinePointLeftChanged(int value) { if (value < MIN_NINE_POINT) { value = MIN_NINE_POINT; - } else if (value >= imgWidth - ninePointRight) { - value = imgWidth - ninePointRight - MIN_NINE_POINT; + } else if (value >= imgWidth - ninePointRight - MIN_GAP_PARALLEL_LINES) { + value = imgWidth - ninePointRight - MIN_GAP_PARALLEL_LINES; } this.ninePointLeft = value; repaint(); @@ -787,8 +788,8 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple private void onNinePointRightChanged(int value) { if (value < MIN_NINE_POINT) { value = MIN_NINE_POINT; - } else if (value >= imgWidth - ninePointLeft) { - value = imgWidth - ninePointLeft - MIN_NINE_POINT; + } else if (value >= imgWidth - ninePointLeft - MIN_GAP_PARALLEL_LINES) { + value = imgWidth - ninePointLeft - MIN_GAP_PARALLEL_LINES; } this.ninePointRight = value; repaint();