2023年5月18日12:26:54 修改音乐列表 添加 鼠标滑过样式
parent
5f4734f470
commit
d0c080e2ad
|
|
@ -619,11 +619,9 @@ public class MusicController {
|
||||||
cell.hoverProperty().addListener((observableValue, aBoolean, t1) -> {
|
cell.hoverProperty().addListener((observableValue, aBoolean, t1) -> {
|
||||||
if (t1 && !text.getText().equals("")) {
|
if (t1 && !text.getText().equals("")) {
|
||||||
position = listView.getItems().indexOf(text.getText());
|
position = listView.getItems().indexOf(text.getText());
|
||||||
text.setFont(new Font(16));
|
|
||||||
listView.getFocusModel().focus(position);
|
listView.getFocusModel().focus(position);
|
||||||
cell.setStyle("-fx-background-color: #369e7d");
|
cell.setStyle("-fx-background-color: #cbcacb");
|
||||||
} else {
|
} else {
|
||||||
text.setFont(new Font(13));
|
|
||||||
cell.setStyle("-fx-background-color: " + color_cell);
|
cell.setStyle("-fx-background-color: " + color_cell);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue