Browse Source

Pull request #5479: REPORT-51919 - 主题切换

Merge in DESIGN/design from ~KERRY/design_10.0:feature/x to feature/x

* commit '2ce997a6b89871772c9bf3cc61d2a05c87cfbb62':
  代码修改
  代码调整
research/11.0
kerry 3 years ago
parent
commit
9dd779c85e
  1. 8
      designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java
  2. 20
      designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java
  3. 8
      designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java

8
designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java

@ -95,8 +95,14 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
borderPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Border"), 280, 24, panel);
this.add(borderPanel, BorderLayout.NORTH);
UILabel backgroundFillLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Background_Fill"));
backgroundFillLabel.setPreferredSize(new Dimension(60, 20));
backgroundPane = new BackgroundPane();
backgroundPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background"), 280, 24, backgroundPane);
JPanel backgroundContainPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{backgroundFillLabel, backgroundPane}},
TableLayoutHelper.FILL_LASTCOLUMN, LayoutConstants.VGAP_SMALL, LayoutConstants.VGAP_MEDIUM);
backgroundPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background"), 280, 24, backgroundContainPane);
this.add(backgroundPanel, BorderLayout.CENTER);
initAllNames();
outerToggleButton.addChangeListener(outerToggleButtonChangeListener);

20
designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java

@ -3,9 +3,8 @@ package com.fr.design.mainframe.backgroundpane;
import com.fr.base.background.ColorBackground;
import com.fr.design.event.UIObserverListener;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.style.color.NewColorSelectPane;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.general.Background;
import java.awt.BorderLayout;
import java.awt.Color;
@ -15,13 +14,13 @@ import java.awt.Color;
*/
public class ColorBackgroundQuickPane extends BackgroundQuickPane {
private NewColorSelectPane detailColorSelectPane;
private NewColorSelectBox colorSelectBox;
public ColorBackgroundQuickPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
detailColorSelectPane = new NewColorSelectPane(false);
this.add(detailColorSelectPane, BorderLayout.NORTH);
colorSelectBox = new NewColorSelectBox(100);
this.add(colorSelectBox, BorderLayout.NORTH);
}
public void populateBean(Background background) {
@ -34,12 +33,11 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
}
public void populateColor(Color color) {
this.detailColorSelectPane.setColor(color);
this.colorSelectBox.setSelectObject(color);
}
public Color updateColor() {
this.detailColorSelectPane.updateUsedColor();
return this.detailColorSelectPane.getNotNoneColor();
return this.colorSelectBox.getSelectObject();
}
/**
@ -49,7 +47,7 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
*/
@Override
public void registerChangeListener(final UIObserverListener listener) {
detailColorSelectPane.addChangeListener(new ChangeListenerImpl(listener));
this.colorSelectBox.addSelectChangeListener(new ChangeListenerImpl(listener));
}
@Override
@ -75,6 +73,6 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
@Override
public void reset() {
this.detailColorSelectPane.setColor(null);
this.colorSelectBox.setSelectObject(null);
}
}

8
designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java

@ -170,11 +170,11 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
boolean isDefaultColor = (i == 0 || i == 1);
Color color = colorArray[i];
colorCellColumn[0] = createFineColorCell(color, isDefaultColor, i, 2);
colorCellColumn[2] = createFineColorCell(color = saturationDown(color, false, true), isDefaultColor, i, 1);
colorCellColumn[1] = createFineColorCell(saturationDown(color, false, true), isDefaultColor, i, 0);
colorCellColumn[2] = createFineColorCell(color = saturationDown(color, isDefaultColor, true), isDefaultColor, i, 1);
colorCellColumn[1] = createFineColorCell(saturationDown(color, isDefaultColor, true), isDefaultColor, i, 0);
color = colorArray[i];
colorCellColumn[3] = createFineColorCell(color = saturationDown(color, false, false), isDefaultColor, i, 3);
colorCellColumn[4] = createFineColorCell(saturationDown(color, false, false), isDefaultColor, i, 4);
colorCellColumn[3] = createFineColorCell(color = saturationDown(color, isDefaultColor, false), isDefaultColor, i, 3);
colorCellColumn[4] = createFineColorCell(saturationDown(color, isDefaultColor, false), isDefaultColor, i, 4);
themeColorCellGrid[i] = colorCellColumn;
}
}

Loading…
Cancel
Save