Browse Source

REPORT-130772 & REPORT-134756 fix:本地还没有复现,但是解决一些已知的缩放问题

fbp/release
lemon 3 months ago
parent
commit
e58080000e
  1. 4
      designer-base/src/main/java/com/fr/design/roleAuthority/RoleTree.java
  2. 6
      designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java
  3. 8
      designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java
  4. 4
      designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java
  5. 12
      designer-realize/src/main/java/com/fr/design/mainframe/AuthorityToolBarPane.java
  6. 3
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneAuthorityEditPane.java

4
designer-base/src/main/java/com/fr/design/roleAuthority/RoleTree.java

@ -33,6 +33,8 @@ import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* Author : daisy
* Time: 下午3:32
@ -48,7 +50,7 @@ public class RoleTree extends UserObjectRefreshJTree<RoleSourceOP> {
this.setCellRenderer(roleTreeRenderer);
this.setEnabled(true);
this.setEditable(true);
this.setRowHeight(20);
this.setRowHeight(scale(20));
this.setDigIn(true);
Handler handler = createHandlerForRoleTree();
this.replaceMouseListener(this, handler, 0);

6
designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java

@ -78,7 +78,6 @@ public class ColorSelectDetailPane extends BasicPane {
// 颜色选择器面板
selectedPanel = new JColorChooser(this.color);
selectedPanel.setPreferredSize(new Dimension(selectedPanel.getWidth(), FineUIScale.scale(SELECT_PANEL_HEIGHT)));
selectedPanel.setPreviewPanel(new JPanel());
swatchChooserPanel = new SwatchChooserPanel();
@ -130,12 +129,11 @@ public class ColorSelectDetailPane extends BasicPane {
column(
2,
cell(new UILabel(i18nText("Fine-Design_Basic_Preview"))),
cell(previewPanel).with(it -> {
cell(previewPanel).weight(1).with(it -> {
it.setBorder(new FineRoundBorder());
it.setPreferredSize(new Dimension(this.getPreferredSize().width, FineUIScale.scale(120)));
it.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
})
)).with(it -> it.setBorder(new ScaledEmptyBorder(0, 10, 0, 10)))
).weight(1)).weight(1).with(it -> it.setBorder(new ScaledEmptyBorder(0, 10, 0, 10)))
).getComponent();
}

8
designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java

@ -16,6 +16,8 @@ import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.theme.utils.FineUIScale.scale;
@ -86,8 +88,7 @@ public class ColorSelectDialog extends MiddleChartDialog{
private void initComponent() {
this.setLayout(new BorderLayout());
this.add(pane,BorderLayout.NORTH);
this.setBasicDialogSize(scale(545),scale(500));
this.setBasicDialogSize(545,500);
this.setResizable(false);
this.applyClosingAction();
@ -95,8 +96,6 @@ public class ColorSelectDialog extends MiddleChartDialog{
JPanel buttonPane = new JPanel();
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
this.add(buttonPane, BorderLayout.SOUTH);
ok = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_OK"));
cancel = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Cancel"));
@ -121,6 +120,7 @@ public class ColorSelectDialog extends MiddleChartDialog{
}
});
this.add(column(10, cell(pane).weight(1), cell(buttonPane)).getComponent());
this.setTitle(pane.title4PopupWindow());
GUICoreUtils.setWindowCenter(getOwner(), this);
}

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

@ -599,7 +599,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
protected void buildChooser() {
setLayout(new BorderLayout(10, 0));
setPreferredSize(new Dimension((int) this.getPreferredSize().getWidth(), scale(180)));
add(buildRightPanel(), BorderLayout.CENTER);
Container rightPane = buildRightPanel();
JPanel container = new JPanel();
container.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 0));
@ -628,7 +628,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
slider.setSize(scale(new Dimension(12, 180)));
trackPanel.setSize(scale(new Dimension(12, 180)));
add(container, BorderLayout.WEST);
add(row(cell(container).weight(1), cell(rightPane).weight(1)).getComponent());
slider.addChangeListener(new SliderChangeListener());
updateTextFields();

12
designer-realize/src/main/java/com/fr/design/mainframe/AuthorityToolBarPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.file.HistoryTemplateListPane;
@ -37,7 +38,10 @@ import java.awt.event.MouseListener;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* Author : daisy
@ -134,14 +138,14 @@ public class AuthorityToolBarPane<T extends WebContent> extends BasicBeanPane<Re
public AuthorityToolBarPane() {
this.setLayout(new BorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(0, PRE_GAP, 10, 0));
this.setBorder(new ScaledEmptyBorder(0, PRE_GAP, 10, 0));
title = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Toolbar_Choose_Role"));
title.setHorizontalAlignment(SwingConstants.LEFT);
title.setPreferredSize(new Dimension(FineUIScale.scale(120), title.getHeight()));
title.setPreferredSize(new Dimension(scale(120), title.getHeight()));
choseComboBox = new UIComboBox(CHOOSEITEM) {
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.width = COMBOX_WIDTH;
dim.width = scale(COMBOX_WIDTH);
return dim;
}
};
@ -158,7 +162,7 @@ public class AuthorityToolBarPane<T extends WebContent> extends BasicBeanPane<Re
authorityEditToolBarPane.setAuthorityToolBarPane(this);
checkToolBarPaneEnable();
toolBarPane.setOpaque(false);
this.add(row(10, cell(title), cell(choseComboBox), cell(toolBarPane)).getComponent());
this.add(row(10, cell(title), cell(choseComboBox), column(flex(), cell(toolBarPane), flex())).getComponent());
}

3
designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneAuthorityEditPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory;
@ -54,7 +55,7 @@ public class ElementCasePaneAuthorityEditPane extends AuthorityEditPane {
private static final int NEW_VALUE = 4;
//新值下面的编辑器的宽度
private static final int NEW_PANE_WIDTH = 120;
private static final Dimension VALUEPANE_NEW_DIMENSION = new Dimension(154,20);
private static final Dimension VALUEPANE_NEW_DIMENSION = FineUIScale.scale(new Dimension(154,20));
private static final Dimension VALUEPANE_OLD_DIMENSION = new Dimension(0,0);

Loading…
Cancel
Save