diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index 7e372efc1b..ae2c70c53e 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/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.FineUIStyle; import com.fine.theme.utils.FineUIUtils; -import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.config.Configuration; import com.fr.config.ServerPreferenceConfig; import com.fr.design.DesignerEnvManager; @@ -431,7 +430,8 @@ public class PreferencePane extends BasicPane { @NotNull 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); } @@ -772,7 +772,7 @@ public class PreferencePane extends BasicPane { cell(logExportDirectoryField), cell(chooseDirBtn), cell(logLevelLabel), - cell(logLevelComboBox) + cell(logLevelComboBox).with(it -> it.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX)) ).getComponent(); return FineUIUtils.wrapComponentWithTitle(logPanel, "Log" + i18nText("Fine-Design_Basic_Export_Setting")); } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DBCPAttrPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DBCPAttrPane.java index 67142a34a4..5d54d907ee 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DBCPAttrPane.java +++ b/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)) { FETCHSIZE.addKeyListener(fetchSizeKeyListener); FETCHSIZE.addInputMethodListener(fetchSizeInputMethodListener); - FETCHSIZE.setHorizontalAlignment(JTextField.RIGHT); southFlowPane = Layouts.column(LayoutConstants.VERTICAL_GAP, cell(new UILabel(Toolkit.i18nText("Fine-Design_Report_Other"))).with(FineUIUtils::wrapBoldLabelWithUnderline), diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/NumberEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/NumberEditor.java index 632beff71f..0e20c1e569 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/NumberEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/NumberEditor.java @@ -41,7 +41,6 @@ public abstract class NumberEditor extends Editor { numberField = createNumberField(); this.add(numberField, BorderLayout.CENTER); this.numberField.addKeyListener(textKeyListener); - this.numberField.setHorizontalAlignment(UITextField.RIGHT); this.setValue(value); this.setName(name); } diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/ExtendedComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/ExtendedComboBox.java index dd85ab5a4f..d931538a19 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/ExtendedComboBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/ExtendedComboBox.java @@ -1,10 +1,8 @@ package com.fr.design.gui.icombobox; -import com.fine.theme.light.ui.FineComboBoxUI; import com.fr.common.inputevent.InputEventBaseOnOS; import java.awt.Component; -import java.awt.Dimension; import java.awt.Point; import java.awt.Rectangle; import java.awt.event.MouseEvent; @@ -12,12 +10,9 @@ import java.util.Vector; import javax.swing.ComboBoxModel; import javax.swing.JComboBox; -import javax.swing.JComponent; import javax.swing.JList; import javax.swing.ListCellRenderer; -import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicComboPopup; -import javax.swing.plaf.basic.ComboPopup; import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; @@ -40,29 +35,6 @@ public class ExtendedComboBox extends UIComboBox { 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 { public ExtendedComboPopup(JComboBox combo) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java index f7b0dbe028..0a802a5d7f 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe; +import com.fine.theme.utils.FineUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.DesignState; @@ -85,6 +86,10 @@ public class CenterRegionContainerPane extends JPanel { eastPane.add(eastCenterPane, BorderLayout.CENTER); toolbarPane.add(eastPane, BorderLayout.NORTH); + Color tabPaneColor = FineUIUtils.getUIColor("TemplateTabPane.background", "fill.gray"); + toolbarPane.setBackground(tabPaneColor); + eastCenterPane.setBackground(tabPaneColor); + this.setLayout(new BorderLayout()); this.add(centerTemplateCardPane = new DesktopCardPane(), BorderLayout.CENTER); centerTemplateCardPane.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));