Browse Source

REPORT-99485 修复工具栏底色问题

newui
vito 1 year ago
parent
commit
42b35d346a
  1. 8
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  2. 2
      designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java
  3. 4
      designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java
  4. 1
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  5. 2
      designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateTreeSearchToolbarPane.java
  6. 7
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  7. 4
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

8
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -10,7 +10,6 @@ import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.UIConstants;
import com.fr.design.data.BasicTableDataTreePane;
import com.fr.design.data.BasicTableDataUtils;
import com.fr.design.data.DesignTableDataManager;
@ -70,7 +69,6 @@ import com.fr.stable.core.PropertyChangeAdapter;
import com.fr.workspace.WorkContext;
import org.jetbrains.annotations.NotNull;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JLabel;
import javax.swing.JPanel;
@ -81,7 +79,6 @@ import javax.swing.border.EmptyBorder;
import javax.swing.tree.TreePath;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.dnd.DnDConstants;
import java.awt.event.ActionEvent;
@ -252,10 +249,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
toolBar.setBorderPainted(true);
toolbarDef.updateToolBar(toolBar);
TreeSearchToolbarPane searchLayerdPane = new TreeSearchToolbarPane(toolBar);
searchLayerdPane.setPreferredSize(new Dimension(this.getWidth(), 23));
return searchLayerdPane;
return new TreeSearchToolbarPane(toolBar);
}
/**

2
designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java

@ -19,7 +19,6 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
@ -73,7 +72,6 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha
initSearchPane();
initContentPane();
add(contentPane, BorderLayout.CENTER);
setPreferredSize(new Dimension(240, 30));
TableDataTreeSearchManager.getInstance().registerTreeSearchStatusChangeListener(this);
}

4
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.FineClientProperties;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.DesignState;
import com.fr.design.base.mode.DesignModeContext;
@ -88,7 +89,6 @@ public class CenterRegionContainerPane extends JPanel {
centerTemplateCardPane.setBorder(new ScaledEmptyBorder(0, 10, 10, 10));
this.add(toolbarPane, BorderLayout.NORTH);
this.setBackground(UIManager.getColor("Center.SpaceColor"));
this.setBorder(new ScaledEmptyBorder(0, 0, 10, 0));
}
public ToolBarMenuDock getToolBarMenuDock() {
@ -100,6 +100,7 @@ public class CenterRegionContainerPane extends JPanel {
*/
private void combineUpTooBar() {
combineUp = new UIToolbar(FlowLayout.LEFT);
FineClientProperties.setStyle(combineUp, "topTools");
combineUp.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
combineUp.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 2));
setUpUpToolBar(null);
@ -221,6 +222,7 @@ public class CenterRegionContainerPane extends JPanel {
// 颜色,字体那些按钮的工具栏
toolbarPane.add(toolbarComponent = ad.resetToolBar(toolbarComponent, plus), BorderLayout.CENTER);
FineClientProperties.setStyle(toolbarComponent, "topTools");
toolbarComponent.setBorder(new ScaledEmptyBorder(0, 10, 10, 10));
JPanel customNorthPane = strategy.customNorthPane(toolbarPane, plus);
if (!isExist(customNorthPane)) {

1
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -175,7 +175,6 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
searchToolbarPane = new TemplateTreeSearchToolbarPane(toolBar);
searchToolbarPane.add(createUpToolBarPane(), BorderLayout.EAST);
searchToolbarPane.setPreferredSize(new Dimension(this.getWidth(), 23));
add(searchToolbarPane, BorderLayout.NORTH);
CardLayout card;
JPanel cardPane = new JPanel(card = new CardLayout());

2
designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateTreeSearchToolbarPane.java

@ -22,7 +22,6 @@ import javax.swing.event.DocumentListener;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
@ -91,7 +90,6 @@ public class TemplateTreeSearchToolbarPane extends JPanel implements TreeSearchS
initSearchPane();
initContentPane();
add(contentPane, BorderLayout.CENTER);
setPreferredSize(new Dimension(240, 30));
TemplateTreeSearchManager.getInstance().registerTreeSearchStatusChangeListener(this);
}

7
designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -52,10 +52,10 @@ import com.fr.design.fun.PluginManagerProvider;
import com.fr.design.fun.TableDataPaneProcessor;
import com.fr.design.gui.UILookAndFeel;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UICombinationButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.imenu.UIMenu;
import com.fr.design.gui.imenu.UIMenuBar;
import com.fr.design.gui.itoolbar.UILargeToolbar;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.locale.impl.SupportLocaleImpl;
import com.fr.design.mainframe.JTemplate;
@ -98,7 +98,6 @@ import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.util.ArrayList;
import java.util.Arrays;
@ -766,8 +765,8 @@ public abstract class ToolBarMenuDock {
*
* @return 大的工具按钮
*/
public UILargeToolbar createLargeToolbar() {
return new UILargeToolbar(FlowLayout.LEFT);
public UICombinationButton createLargeToolbar() {
return new UICombinationButton();
}
/**

4
designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

@ -1092,7 +1092,6 @@ ToolBar.arrowKeysOnlyNavigation = true
ToolBar.hoverButtonGroupArc = 8
ToolBar.floatable = false
ToolBar.gripColor = @icon
ToolBar.background = #fff
ToolBar.dockingBackground = darken($ToolBar.background,5%)
ToolBar.dockingForeground = $Component.borderColor
ToolBar.floatingBackground = $ToolBar.background
@ -1260,6 +1259,9 @@ CellOtherSetPane.height=$Component.defaultHeight
background : @BrandColor; \
arc : 3
[style]ToolBar.topTools = \
background: #fff
#---- clearButton ----
# for clear/cancel button in text fields

Loading…
Cancel
Save