Browse Source

REPORT-1096 取色板=》改为只在按下鼠标左键时设置颜色

master
plough 8 years ago
parent
commit
f2ba828f5f
  1. 10
      designer_base/src/com/fr/design/style/color/ColorPicker.java

10
designer_base/src/com/fr/design/style/color/ColorPicker.java

@ -94,9 +94,11 @@ public class ColorPicker extends JDialog implements ActionListener
validate(); // 更新所有子控件 validate(); // 更新所有子控件
} }
public void pickComplete() { public void pickComplete(Boolean setColor) {
timer.stop(); timer.stop();
if (setColor) {
colorSelectable.setColor(colorToSet); colorSelectable.setColor(colorToSet);
}
this.dispose(); this.dispose();
} }
@ -111,7 +113,11 @@ public class ColorPicker extends JDialog implements ActionListener
{ {
public void mousePressed(MouseEvent e) public void mousePressed(MouseEvent e)
{ {
pickComplete(); if (e.getButton() == e.BUTTON1) { // 左键确定
pickComplete(true);
} else {
pickComplete(false);
}
} }
} }
} }

Loading…
Cancel
Save