* Close #3649: 点击账户卡片空白处时切换账户 * update
This commit is contained in:
@@ -21,6 +21,7 @@ import com.jfoenix.controls.JFXButton;
|
|||||||
import com.jfoenix.controls.JFXRadioButton;
|
import com.jfoenix.controls.JFXRadioButton;
|
||||||
import com.jfoenix.effects.JFXDepthManager;
|
import com.jfoenix.effects.JFXDepthManager;
|
||||||
import javafx.geometry.Pos;
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.Cursor;
|
||||||
import javafx.scene.canvas.Canvas;
|
import javafx.scene.canvas.Canvas;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.control.SkinBase;
|
import javafx.scene.control.SkinBase;
|
||||||
@@ -50,13 +51,11 @@ public final class AccountListItemSkin extends SkinBase<AccountListItem> {
|
|||||||
super(skinnable);
|
super(skinnable);
|
||||||
|
|
||||||
BorderPane root = new BorderPane();
|
BorderPane root = new BorderPane();
|
||||||
|
root.setCursor(Cursor.HAND);
|
||||||
|
FXUtils.onClicked(root, skinnable::fire);
|
||||||
|
|
||||||
JFXRadioButton chkSelected = new JFXRadioButton() {
|
JFXRadioButton chkSelected = new JFXRadioButton();
|
||||||
@Override
|
chkSelected.setMouseTransparent(true);
|
||||||
public void fire() {
|
|
||||||
skinnable.fire();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
BorderPane.setAlignment(chkSelected, Pos.CENTER);
|
BorderPane.setAlignment(chkSelected, Pos.CENTER);
|
||||||
chkSelected.selectedProperty().bind(skinnable.selectedProperty());
|
chkSelected.selectedProperty().bind(skinnable.selectedProperty());
|
||||||
root.setLeft(chkSelected);
|
root.setLeft(chkSelected);
|
||||||
|
|||||||
Reference in New Issue
Block a user