Browse Source

REPORT-144631 调整图标自动类型推荐布局,修改部分icon

fbp/feature
shengzu.xue 2 months ago
parent
commit
0c6ce3af33
  1. 6
      designer-base/src/main/resources/com/fr/design/images/m_insert/auto_chart_disabled.svg
  2. 6
      designer-base/src/main/resources/com/fr/design/images/m_insert/auto_chart_normal.svg
  3. 34
      designer-chart/src/main/java/com/fr/design/chart/AutoChartTypePane.java
  4. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java
  5. 3
      designer-realize/src/main/java/com/fr/design/actions/insert/cell/AutoChartCellAction.java
  6. 2
      designer-realize/src/main/java/com/fr/design/actions/insert/flot/AutoChartFloatAction.java

6
designer-base/src/main/resources/com/fr/design/images/m_insert/auto_chart_disabled.svg

@ -0,0 +1,6 @@
<svg width="16" height="16" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.5 26C10.5 26.5523 10.9477 27 11.5 27H17C17.5523 27 18 26.5523 18 26V23.0365L17.3945 22.4032C16.6539 21.6285 17.0125 20.3675 18 20.0674V4C18 3.44771 17.5523 3 17 3H11.5C10.9477 3 10.5 3.44772 10.5 4V26ZM12.1 25.4H16.4V4.6H12.1V25.4Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M27.5 10V19.6285L26.6486 19.4739L25.9 18.083V10.6H21.6V18.7572L21.2143 19.4739L20 19.6943V10C20 9.44772 20.4477 9 21 9H26.5C27.0523 9 27.5 9.44771 27.5 10Z" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M20.7058 28.278C20.4063 28.4222 20.0667 28.1754 20.1113 27.8461L20.5647 24.4978C20.5817 24.372 20.5405 24.2453 20.4528 24.1535L18.118 21.7112C17.8883 21.4709 18.018 21.0717 18.345 21.0124L21.6695 20.4088C21.7944 20.3862 21.9022 20.3078 21.9624 20.1961L23.5637 17.2208C23.7212 16.9281 24.141 16.9281 24.2985 17.2208L25.8998 20.1961C25.8997 20.1959 25.8999 20.1962 25.8998 20.1961C25.96 20.3078 26.0681 20.3862 26.193 20.4089L29.5172 21.0124C29.8442 21.0717 29.9739 21.4709 29.7442 21.7112L27.5 24.0587L27.4097 24.1536C27.322 24.2453 27.2808 24.372 27.2978 24.4979L27.5 25.9909V25.9932L27.7509 27.8461C27.7955 28.1754 27.4559 28.4222 27.1564 28.278L24.1121 26.8121C24.0737 26.7937 24.0332 26.7814 23.992 26.7753C23.9105 26.7634 23.8263 26.7756 23.7504 26.8122L20.7058 28.278Z" fill="#0A1C38" fill-opacity="0.29"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 27C1.44772 27 1 26.5523 1 26V16C1 15.4477 1.44772 15 2 15H7.5C8.05228 15 8.5 15.4477 8.5 16V26C8.5 26.5523 8.05228 27 7.5 27H2ZM6.9 25.4H2.6V16.6H6.9V25.4Z" fill="#0A1C38" fill-opacity="0.29"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

6
designer-base/src/main/resources/com/fr/design/images/m_insert/auto_chart_normal.svg

@ -0,0 +1,6 @@
<svg width="16" height="16" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.5 26C10.5 26.5523 10.9477 27 11.5 27H17C17.5523 27 18 26.5523 18 26V23.0365L17.3945 22.4032C16.6539 21.6285 17.0125 20.3675 18 20.0674V4C18 3.44771 17.5523 3 17 3H11.5C10.9477 3 10.5 3.44772 10.5 4V26ZM12.1 25.4H16.4V4.6H12.1V25.4Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M27.5 10V19.6285L26.6486 19.4739L25.9 18.083V10.6H21.6V18.7572L21.2143 19.4739L20 19.6943V10C20 9.44772 20.4477 9 21 9H26.5C27.0523 9 27.5 9.44771 27.5 10Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M20.7058 28.278C20.4063 28.4222 20.0667 28.1754 20.1113 27.8461L20.5647 24.4978C20.5817 24.372 20.5405 24.2453 20.4528 24.1535L18.118 21.7112C17.8883 21.4709 18.018 21.0717 18.345 21.0124L21.6695 20.4088C21.7944 20.3862 21.9022 20.3078 21.9624 20.1961L23.5637 17.2208C23.7212 16.9281 24.141 16.9281 24.2985 17.2208L25.8998 20.1961C25.8997 20.1959 25.8999 20.1962 25.8998 20.1961C25.96 20.3078 26.0681 20.3862 26.193 20.4089L29.5172 21.0124C29.8442 21.0717 29.9739 21.4709 29.7442 21.7112L27.5 24.0587L27.4097 24.1536C27.322 24.2453 27.2808 24.372 27.2978 24.4979L27.5 25.9909V25.9932L27.7509 27.8461C27.7955 28.1754 27.4559 28.4222 27.1564 28.278L24.1121 26.8121C24.0737 26.7937 24.0332 26.7814 23.992 26.7753C23.9105 26.7634 23.8263 26.7756 23.7504 26.8122L20.7058 28.278Z" fill="#0A1C38" fill-opacity="0.9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 27C1.44772 27 1 26.5523 1 26V16C1 15.4477 1.44772 15 2 15H7.5C8.05228 15 8.5 15.4477 8.5 16V26C8.5 26.5523 8.05228 27 7.5 27H2ZM6.9 25.4H2.6V16.6H6.9V25.4Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

34
designer-chart/src/main/java/com/fr/design/chart/AutoChartTypePane.java

@ -1,7 +1,7 @@
package com.fr.design.chart;
import com.fine.theme.utils.FineUIScale;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.utils.FineUIStyle;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.chart.chartdata.CallbackEvent;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.chart.auto.AutoTypeCalculate;
@ -19,6 +19,7 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.GeneralUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.vanchart.VanChart;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import javax.swing.BorderFactory;
import javax.swing.DefaultListCellRenderer;
@ -48,6 +49,10 @@ import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.column;
/**
* @author Bjorn
@ -140,18 +145,18 @@ public class AutoChartTypePane extends ChartWizardPane implements CallbackEvent
private JPanel createContentPane() {
JPanel contentPane = new JPanel(new BorderLayout());
contentPane.add(Layouts.column(
Layouts.row(10,
Layouts.flex().weight(0.1),
Layouts.cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Table_Data") + ":")).weight(1),
Layouts.cell(tableNameComboBox).weight(3),
Layouts.cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Data_Field") + ":")).weight(1.3),
Layouts.cell(dataFieldBox).weight(3),
Layouts.cell(refreshButton).weight(1.5),
Layouts.flex(3)
).with(it -> it.setPreferredSize(new Dimension(super.getPreferredSize().width, FineUIScale.scale(tableNameComboBox.getPreferredSize().height))))
).getComponent());
contentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
contentPane.add(column(
row(10,
cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Table_Data"))),
cell(tableNameComboBox).weight(1),
cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Data_Field"))),
cell(dataFieldBox).weight(1),
cell(refreshButton),
flex(1)
),
flex()
).with(it -> it.setBorder(new ScaledEmptyBorder(10, 10, 10, 10))).getComponent());
return contentPane;
}
@ -206,6 +211,7 @@ public class AutoChartTypePane extends ChartWizardPane implements CallbackEvent
private void initRefreshLabel() {
refreshButton = new UIButton(Toolkit.i18nText("Fine-Design_Chart_Recommend"));
FineUIStyle.setStyle(refreshButton, FineUIStyle.STYLE_PRIMARY);
refreshButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {

3
designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java

@ -2,6 +2,7 @@ package com.fr.van.chart.designer.type;
import com.fr.base.BaseUtils;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.base.svg.IconUtils;
import com.fr.chart.base.AttrFillStyle;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Legend;
@ -61,7 +62,7 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Van
buttonPane.setLayout(new BorderLayout());
if (ChartTypeManager.AUTO_CHART) {
autoButton = new UIButton(Toolkit.i18nText("Fine-Design_Chart_Auto_Recommended_Chart"),
BaseUtils.readIcon("/com/fr/design/images/m_insert/auto_chart.png")) {
IconUtils.readIcon("/com/fr/design/images/m_insert/auto_chart_normal.svg")) {
@Override
public Dimension getPreferredSize() {
return new Dimension((int) super.getPreferredSize().getWidth(), 25);

3
designer-realize/src/main/java/com/fr/design/actions/insert/cell/AutoChartCellAction.java

@ -1,6 +1,5 @@
package com.fr.design.actions.insert.cell;
import com.fr.base.BaseUtils;
import com.fr.chart.chartattr.AutoChartCollection;
import com.fr.common.annotations.Open;
import com.fr.design.actions.core.WorkBookSupportable;
@ -31,7 +30,7 @@ public class AutoChartCellAction extends AbstractCellAction implements WorkBookS
this.setMenuKeySet(INSERT_AUTO_CHART);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_insert/auto_chart.png"));
this.setSmallIcon("/com/fr/design/images/m_insert/auto_chart_normal.svg");
}
public static final MenuKeySet INSERT_AUTO_CHART = new MenuKeySet() {

2
designer-realize/src/main/java/com/fr/design/actions/insert/flot/AutoChartFloatAction.java

@ -28,7 +28,7 @@ public class AutoChartFloatAction extends ChartFloatAction {
this.setMenuKeySet(FLOAT_INSERT_AUTO_CHART);
this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_insert/auto_chart.png"));
this.setSmallIcon("/com/fr/design/images/m_insert/auto_chart_normal.svg");
}
public static final MenuKeySet FLOAT_INSERT_AUTO_CHART = new MenuKeySet() {

Loading…
Cancel
Save