Browse Source

REPORT-127437 fix: 新建 poly sheet 按钮缩放问题

newui
lemon 3 months ago
parent
commit
b852fa8192
  1. 2
      designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java
  2. 3
      designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java
  3. 4
      designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java
  4. 5
      designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

2
designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java

@ -710,7 +710,7 @@ public class MultiTemplateTabPane extends Row {
private boolean isOverListDown(int evtX) {
int maxWidth = getWidth() - scale(leadingWidth);
int maxWidth = getWidth() - scale(TRAILING_WIDTH);
return evtX >= (maxWidth + SMALLGAP) && evtX <= (getWidth() - SMALLGAP);
}

3
designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java

@ -4,7 +4,6 @@ package com.fr.design.style.color;
* Created by plough on 2016/12/22.
*/
import com.fine.theme.utils.FineUIScale;
import com.fr.design.DesignerEnvManager;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.IOUtils;
@ -26,7 +25,7 @@ public class ColorPicker extends JDialog implements ActionListener {
private Container container = getContentPane(); // 主容器
private int setCoordinateX; // 取色框x坐标
private int setCoordinateY; // 取色框y坐标
private int colorPickerSize = FineUIScale.scale(190); // 取色框尺寸
private int colorPickerSize = 190; // 取色框尺寸
private int scaleFactor = 16; // 放大倍数
private ColorPickerPanel colorPickerPanel = new ColorPickerPanel(scaleFactor); // 取色框内容面板

4
designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java

@ -718,7 +718,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
BUTTON_SPINNER_GAP,
row(fix((int) hRadio.getPreferredSize().getHeight()), cell(new UILabel("#")), flex()).with(it -> it.setPreferredSize(hRadio.getPreferredSize())),
cell(field),
cell(pane)
cell(pane).with(it -> it.setPreferredSize(new Dimension((int) pickColorButton.getPreferredSize().getWidth(), (int) pickColorButton.getPreferredSize().getHeight())))
)
).getComponent());
@ -790,7 +790,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
TextDocumentListener listen = new TextDocumentListener();
field = new UITextField();
field.setPreferredSize(FineUIScale.scale(new Dimension(hSpinner.getPreferredSize())));
field.setPreferredSize(new Dimension(hSpinner.getPreferredSize()));
field.getDocument().addDocumentListener(listen);
return column(

5
designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

@ -55,6 +55,7 @@ import java.awt.geom.RoundRectangle2D;
import java.util.ArrayList;
import java.util.List;
import static com.fine.theme.utils.FineUIScale.scale;
import static com.fine.theme.utils.FineUIStyle.LIGHT_GREY;
@ -579,9 +580,9 @@ public class SheetNameTabPane extends JPanel implements MouseListener, MouseMoti
}
private void processLeftMouseButton(int evtX){
if (evtX > iconLocation && evtX < iconLocation + GRID_TOSHEET_RIGHT) {
if (evtX > iconLocation && evtX < iconLocation + scale(GRID_TOSHEET_RIGHT)) {
firstInsertActionPerformed();
} else if (evtX > iconLocation + POLY_TOSHEET_LEFT && evtX < iconLocation + POLY_TOSHEET_RIGHT) {
} else if (evtX > iconLocation + scale(POLY_TOSHEET_LEFT) && evtX < iconLocation + scale(POLY_TOSHEET_RIGHT)) {
new PolyReportInsertAction().actionPerformed(null);
}

Loading…
Cancel
Save