Browse Source

Pull request #14536: REPORT-113994 【NewUI】视觉&测试验收问题修复

Merge in DESIGN/design from ~LEVY.XIE/design:newui to newui

* commit '992ab3cde08934f479e6053a0fd1432a351b9a7b':
  REPORT-113994 【NewUI】视觉&测试验收问题修复
newui
Levy.Xie-解安森 3 months ago committed by Coral.Chen-张晨
parent
commit
ed35e26016
  1. 6
      designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
  2. 1
      designer-base/src/main/java/com/fr/design/data/datapane/connect/DBCPAttrPane.java
  3. 1
      designer-base/src/main/java/com/fr/design/editor/editor/NumberEditor.java
  4. 28
      designer-base/src/main/java/com/fr/design/gui/icombobox/ExtendedComboBox.java
  5. 5
      designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java

6
designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java

@ -4,7 +4,6 @@ import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle; import com.fine.theme.utils.FineUIStyle;
import com.fine.theme.utils.FineUIUtils; import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.config.Configuration; import com.fr.config.Configuration;
import com.fr.config.ServerPreferenceConfig; import com.fr.config.ServerPreferenceConfig;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
@ -431,7 +430,8 @@ public class PreferencePane extends BasicPane {
@NotNull @NotNull
private JPanel patchScroll(JPanel generalPane) { private JPanel patchScroll(JPanel generalPane) {
UIScrollPane uiScrollPane = new UIScrollPane(generalPane, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); UIScrollPane uiScrollPane = new UIScrollPane(FineLayoutBuilder.asBorderLayoutWrapped(generalPane),
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
return FineLayoutBuilder.asBorderLayoutWrapped(uiScrollPane); return FineLayoutBuilder.asBorderLayoutWrapped(uiScrollPane);
} }
@ -772,7 +772,7 @@ public class PreferencePane extends BasicPane {
cell(logExportDirectoryField), cell(logExportDirectoryField),
cell(chooseDirBtn), cell(chooseDirBtn),
cell(logLevelLabel), cell(logLevelLabel),
cell(logLevelComboBox) cell(logLevelComboBox).with(it -> it.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX))
).getComponent(); ).getComponent();
return FineUIUtils.wrapComponentWithTitle(logPanel, "Log" + i18nText("Fine-Design_Basic_Export_Setting")); return FineUIUtils.wrapComponentWithTitle(logPanel, "Log" + i18nText("Fine-Design_Basic_Export_Setting"));
} }

1
designer-base/src/main/java/com/fr/design/data/datapane/connect/DBCPAttrPane.java

@ -199,7 +199,6 @@ public class DBCPAttrPane extends BasicPane {
if (showOtherConfig(databaseName)) { if (showOtherConfig(databaseName)) {
FETCHSIZE.addKeyListener(fetchSizeKeyListener); FETCHSIZE.addKeyListener(fetchSizeKeyListener);
FETCHSIZE.addInputMethodListener(fetchSizeInputMethodListener); FETCHSIZE.addInputMethodListener(fetchSizeInputMethodListener);
FETCHSIZE.setHorizontalAlignment(JTextField.RIGHT);
southFlowPane = Layouts.column(LayoutConstants.VERTICAL_GAP, southFlowPane = Layouts.column(LayoutConstants.VERTICAL_GAP,
cell(new UILabel(Toolkit.i18nText("Fine-Design_Report_Other"))).with(FineUIUtils::wrapBoldLabelWithUnderline), cell(new UILabel(Toolkit.i18nText("Fine-Design_Report_Other"))).with(FineUIUtils::wrapBoldLabelWithUnderline),

1
designer-base/src/main/java/com/fr/design/editor/editor/NumberEditor.java

@ -41,7 +41,6 @@ public abstract class NumberEditor<T extends Number> extends Editor<T> {
numberField = createNumberField(); numberField = createNumberField();
this.add(numberField, BorderLayout.CENTER); this.add(numberField, BorderLayout.CENTER);
this.numberField.addKeyListener(textKeyListener); this.numberField.addKeyListener(textKeyListener);
this.numberField.setHorizontalAlignment(UITextField.RIGHT);
this.setValue(value); this.setValue(value);
this.setName(name); this.setName(name);
} }

28
designer-base/src/main/java/com/fr/design/gui/icombobox/ExtendedComboBox.java

@ -1,10 +1,8 @@
package com.fr.design.gui.icombobox; package com.fr.design.gui.icombobox;
import com.fine.theme.light.ui.FineComboBoxUI;
import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.common.inputevent.InputEventBaseOnOS;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension;
import java.awt.Point; import java.awt.Point;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
@ -12,12 +10,9 @@ import java.util.Vector;
import javax.swing.ComboBoxModel; import javax.swing.ComboBoxModel;
import javax.swing.JComboBox; import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JList; import javax.swing.JList;
import javax.swing.ListCellRenderer; import javax.swing.ListCellRenderer;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicComboPopup; import javax.swing.plaf.basic.BasicComboPopup;
import javax.swing.plaf.basic.ComboPopup;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
@ -40,29 +35,6 @@ public class ExtendedComboBox extends UIComboBox {
super(items); super(items);
} }
/**
* 更新UI
*/
public void updateUI() {
setUI(new ExtendedComboBoxUI());
}
static class ExtendedComboBoxUI extends FineComboBoxUI {
public static ComponentUI createUI(JComponent c) {
return new ExtendedComboBoxUI();
}
protected ComboPopup createPopup() {
ExtendedComboPopup popup = new ExtendedComboPopup(comboBox);
popup.getAccessibleContext().setAccessibleParent(comboBox);
return popup;
}
public ComboPopup getPopup() {
return popup;
}
}
static class ExtendedComboPopup extends BasicComboPopup { static class ExtendedComboPopup extends BasicComboPopup {
public ExtendedComboPopup(JComboBox combo) { public ExtendedComboPopup(JComboBox combo) {

5
designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.DesignState; import com.fr.design.DesignState;
@ -85,6 +86,10 @@ public class CenterRegionContainerPane extends JPanel {
eastPane.add(eastCenterPane, BorderLayout.CENTER); eastPane.add(eastCenterPane, BorderLayout.CENTER);
toolbarPane.add(eastPane, BorderLayout.NORTH); toolbarPane.add(eastPane, BorderLayout.NORTH);
Color tabPaneColor = FineUIUtils.getUIColor("TemplateTabPane.background", "fill.gray");
toolbarPane.setBackground(tabPaneColor);
eastCenterPane.setBackground(tabPaneColor);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(centerTemplateCardPane = new DesktopCardPane(), BorderLayout.CENTER); this.add(centerTemplateCardPane = new DesktopCardPane(), BorderLayout.CENTER);
centerTemplateCardPane.setBorder(new ScaledEmptyBorder(10, 10, 10, 10)); centerTemplateCardPane.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));

Loading…
Cancel
Save