From 7ed3a16969e9f5d92f48c369e36bf3fad795657e Mon Sep 17 00:00:00 2001 From: vito Date: Wed, 11 Sep 2024 20:40:41 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-134248=20=E5=90=AF=E5=8A=A8=E9=A1=B5?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../startup/ui/StartupPageWorkspacePanel.java | 31 ++++++------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java index 2767f8945b..741e7dc5b5 100644 --- a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java +++ b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java @@ -7,7 +7,6 @@ import com.fine.theme.utils.FineUIStyle; import com.fine.theme.utils.FineUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.util.ScaledEmptyBorder; -import com.fr.design.components.tooltip.ModernToolTip; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.FRGraphics2D; @@ -22,7 +21,6 @@ import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.JScrollBar; -import javax.swing.JToolTip; import javax.swing.JViewport; import javax.swing.ScrollPaneConstants; import java.awt.BasicStroke; @@ -57,9 +55,9 @@ public class StartupPageWorkspacePanel extends JPanel { private static final Color PATH_COLOR = new Color(51, 51, 52, (int) Math.round(255 * 0.5)); /* 长度 */ - + private static final int SCROLL_BAR_WIDTH = 20; - + private static final int CONTENT_WIDTH = scale(StartupPageConstants.CONTENT_WIDTH + SCROLL_BAR_WIDTH); private static final int BORDER_THIN = 2; @@ -140,6 +138,7 @@ public class StartupPageWorkspacePanel extends JPanel { this.contentPanel.setOpaque(false); this.add(contentPanel, BorderLayout.NORTH); } + private JComponent generateUnLimitContentPanel(List> partitions) { JComponent panel = generateUnLimitContentPanel0(partitions); @@ -228,7 +227,7 @@ public class StartupPageWorkspacePanel extends JPanel { g.fillRoundRect(0, 0, preferredSize.width, preferredSize.height, 5, 5); } } - }; + }; showAllPanel.setLayout(new BorderLayout()); UILabel fontLabel = new UILabel(Toolkit.i18nText("Fine-Design_Startup_Page_Expand_All")); @@ -287,10 +286,6 @@ public class StartupPageWorkspacePanel extends JPanel { AtomicReference borderColorRef = new AtomicReference<>(null); JPanel selectWorkspacePanel = new JPanel() { - @Override - public JToolTip createToolTip() { - return new ModernToolTip(); - } @Override protected void paintComponent(Graphics g) { @@ -325,7 +320,7 @@ public class StartupPageWorkspacePanel extends JPanel { } }; selectWorkspacePanel.setLayout(new BorderLayout()); - selectWorkspacePanel.setToolTipText(Toolkit.i18nText("Fine-Design_Startup_Page_Double_Click_Enter_Workspace")); + selectWorkspacePanel.setToolTipText(workspaceInfo.getPath()); selectWorkspacePanel.setBorder(new ScaledEmptyBorder(10, 10, 10, 10)); { @@ -348,7 +343,7 @@ public class StartupPageWorkspacePanel extends JPanel { FineUIUtils.setFontSize(nameLabel, NAME_LABEL_SIZE); nameLabel.setPreferredSize(PATH_DIMENSION); Color nameForeground = nameLabel.getForeground(); - simpleDescPanel.add(nameLabel,BorderLayout.NORTH); + simpleDescPanel.add(nameLabel, BorderLayout.NORTH); UILabel pathLabel = new UILabel(workspaceInfo.getPath()); pathLabel.setPreferredSize(PATH_DIMENSION); @@ -369,7 +364,7 @@ public class StartupPageWorkspacePanel extends JPanel { Color hoverColor = FlatUIUtils.getUIColor("brand.normal", HOVER_COLOR); borderColorRef.set(hoverColor); nameLabel.setForeground(hoverColor); - pathLabel.setForeground(hoverColor ); + pathLabel.setForeground(hoverColor); repaintAll(); } @@ -394,12 +389,7 @@ public class StartupPageWorkspacePanel extends JPanel { }; - UILabel arrowLabel = new UILabel(new LazyIcon("more_arrow", 20)) { - @Override - public JToolTip createToolTip() { - return new ModernToolTip(); - } - }; + UILabel arrowLabel = new UILabel(new LazyIcon("more_arrow", 20)); arrowLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Startup_Page_Enter_Workspace")); arrowLabel.addMouseListener(new MouseAdapter() { @Override @@ -433,10 +423,6 @@ public class StartupPageWorkspacePanel extends JPanel { // 选择并新建 AtomicReference borderColorRef = new AtomicReference<>(null); JPanel selectAndCreatePanel = new JPanel() { - @Override - public JToolTip createToolTip() { - return new ModernToolTip(); - } @Override protected void paintComponent(Graphics g) { @@ -481,6 +467,7 @@ public class StartupPageWorkspacePanel extends JPanel { label.setIcon(new LazyIcon("add", 20)); repaintAll(); } + @Override public void mousePressed(MouseEvent e) { pageModel.setSelectWorkspaceInfo(workspaceInfo);