added context-menu styling (basically the same as the one from choice-box)

This commit is contained in:
Tobias Hagemann
2019-09-04 15:42:20 +02:00
parent 73bc2d06a7
commit 1089497c08
3 changed files with 35 additions and 12 deletions
+17 -5
View File
@@ -617,7 +617,7 @@
/*******************************************************************************
* *
* Dropdown *
* ChoiceBox *
* *
******************************************************************************/
@@ -645,17 +645,29 @@
}
.choice-box .context-menu {
-fx-translate-x: -1.4em;
}
/*******************************************************************************
* *
* ContextMenu *
* *
******************************************************************************/
.context-menu {
-fx-background-color: CONTROL_BORDER_NORMAL, CONTROL_BG_NORMAL;
-fx-background-insets: 0, 1px;
-fx-background-radius: 4px;
-fx-padding: 0.2em 0 0.2em 0;
-fx-translate-x: -1.4em;
}
.context-menu {
-fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.2), 8, 0, 0, 0);
}
/*******************************************************************************
* *
* MenuItem *
* *
******************************************************************************/
.menu-item {
-fx-padding: 0.2em 0.4em 0.2em 0.4em;
}
+17 -5
View File
@@ -617,7 +617,7 @@
/*******************************************************************************
* *
* Dropdown *
* ChoiceBox *
* *
******************************************************************************/
@@ -645,17 +645,29 @@
}
.choice-box .context-menu {
-fx-translate-x: -1.4em;
}
/*******************************************************************************
* *
* ContextMenu *
* *
******************************************************************************/
.context-menu {
-fx-background-color: CONTROL_BORDER_NORMAL, CONTROL_BG_NORMAL;
-fx-background-insets: 0, 1px;
-fx-background-radius: 4px;
-fx-padding: 0.2em 0 0.2em 0;
-fx-translate-x: -1.4em;
}
.context-menu {
-fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.2), 8, 0, 0, 0);
}
/*******************************************************************************
* *
* MenuItem *
* *
******************************************************************************/
.menu-item {
-fx-padding: 0.2em 0.4em 0.2em 0.4em;
}
@@ -18,8 +18,7 @@
<StackPane VBox.vgrow="ALWAYS">
<ListView fx:id="vaultList" editable="true">
<contextMenu>
<ContextMenu fx:id="test">
<!-- TODO: add style class to contextmenu & its entries -->
<ContextMenu>
<items>
<MenuItem text="%main.vaultlist.contextMenu.add" onAction="#didClickAddVault"/>
<MenuItem text="%main.vaultlist.contextMenu.remove" onAction="#didClickRemoveVault" disable="${controller.noVaultSelected}"/>