Bladeren bron

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

Tobias Hagemann 5 jaren geleden
bovenliggende
commit
1089497c08

+ 17 - 5
main/ui/src/main/resources/css/dark_theme.css

@@ -617,7 +617,7 @@
 
 /*******************************************************************************
  *                                                                             *
- * Dropdown                                                                    *
+ * ChoiceBox                                                                   *
  *                                                                             *
  ******************************************************************************/
 
@@ -645,17 +645,29 @@
 }
 
 .choice-box .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;
 }
 
+/*******************************************************************************
+ *                                                                             *
+ * 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-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
main/ui/src/main/resources/css/light_theme.css

@@ -617,7 +617,7 @@
 
 /*******************************************************************************
  *                                                                             *
- * Dropdown                                                                    *
+ * ChoiceBox                                                                   *
  *                                                                             *
  ******************************************************************************/
 
@@ -645,17 +645,29 @@
 }
 
 .choice-box .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;
 }
 
+/*******************************************************************************
+ *                                                                             *
+ * 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-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;
 }

+ 1 - 2
main/ui/src/main/resources/fxml/vault_list.fxml

@@ -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}"/>