mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-02 20:36:44 +00:00
drag over highlight
This commit is contained in:
parent
87efdfdd5d
commit
3d04ce4686
2 changed files with 19 additions and 2 deletions
|
@ -32,6 +32,7 @@ import java.util.ResourceBundle;
|
||||||
|
|
||||||
public class AppController implements Initializable {
|
public class AppController implements Initializable {
|
||||||
private static final String TRANSACTION_TAB_TYPE = "transaction";
|
private static final String TRANSACTION_TAB_TYPE = "transaction";
|
||||||
|
public static final String DRAG_OVER_CLASS = "drag-over";
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private CheckMenuItem showTxHex;
|
private CheckMenuItem showTxHex;
|
||||||
|
@ -70,6 +71,14 @@ public class AppController implements Initializable {
|
||||||
event.consume();
|
event.consume();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
rootStack.setOnDragEntered(event -> {
|
||||||
|
rootStack.getStyleClass().add(DRAG_OVER_CLASS);
|
||||||
|
});
|
||||||
|
|
||||||
|
rootStack.setOnDragExited(event -> {
|
||||||
|
rootStack.getStyleClass().removeAll(DRAG_OVER_CLASS);
|
||||||
|
});
|
||||||
|
|
||||||
tabs.getSelectionModel().selectedItemProperty().addListener((observable, old_val, selectedTab) -> {
|
tabs.getSelectionModel().selectedItemProperty().addListener((observable, old_val, selectedTab) -> {
|
||||||
if(selectedTab != null) {
|
if(selectedTab != null) {
|
||||||
String tabType = (String)selectedTab.getUserData();
|
String tabType = (String)selectedTab.getUserData();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.background-box {
|
.background-box {
|
||||||
-fx-stroke: #696c77;
|
-fx-stroke: #a0a1a7;
|
||||||
-fx-stroke-width: 1px;
|
-fx-stroke-width: 1px;
|
||||||
-fx-stroke-dash-array: 5 5;
|
-fx-stroke-dash-array: 5 5;
|
||||||
-fx-arc-height: 50;
|
-fx-arc-height: 50;
|
||||||
|
@ -7,7 +7,15 @@
|
||||||
-fx-fill: transparent;
|
-fx-fill: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.drag-over > .background-box {
|
||||||
|
-fx-stroke: #383a42;
|
||||||
|
}
|
||||||
|
|
||||||
.background-text {
|
.background-text {
|
||||||
-fx-fill: #696c77;
|
-fx-fill: #a0a1a7;
|
||||||
-fx-font-size: 20;
|
-fx-font-size: 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.drag-over > .background-text {
|
||||||
|
-fx-fill: #383a42;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue