Browse Source

REPORT-137586 fix: 控件背景交互逻辑修复

fbp/merge
Levy.Xie-解安森 2 months ago
parent
commit
ab13a84103
  1. 10
      designer-base/src/main/java/com/fr/design/widget/component/BackgroundCompPane.java

10
designer-base/src/main/java/com/fr/design/widget/component/BackgroundCompPane.java

@ -1,5 +1,6 @@
package com.fr.design.widget.component;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
@ -12,7 +13,6 @@ import javax.swing.JPanel;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT;
import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT;
@ -40,26 +40,24 @@ public abstract class BackgroundCompPane<T extends Widget> extends BasicPane {
backgroundHead = new UIButtonGroup(titles);
panel = column(VERTICAL_GAP,
row(
flex(LEFT_WEIGHT),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Initial"))).weight(RIGHT_WEIGHT / 2),
cell(initialBackgroundEditor).weight(RIGHT_WEIGHT / 2)
),
row(
flex(LEFT_WEIGHT),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Over"))).weight(RIGHT_WEIGHT / 2),
cell(overBackgroundEditor).weight(RIGHT_WEIGHT / 2)
),
row(
flex(LEFT_WEIGHT),
cell(getClickLabel()).weight(RIGHT_WEIGHT / 2),
cell(clickBackgroundEditor).weight(RIGHT_WEIGHT / 2)
)
).getComponent();
).with(it -> it.setBorder(new ScaledEmptyBorder(0, 10, 0, 0))).getComponent();
this.add(column(VERTICAL_GAP,
row(
cell(headLabel).weight(LEFT_WEIGHT),
cell(backgroundHead).weight(RIGHT_WEIGHT)
)
),
cell(panel)
).getComponent());
}

Loading…
Cancel
Save