Ver código fonte

replaced text-flow with label+graphic

Tobias Hagemann 5 anos atrás
pai
commit
9c104beeba

+ 5 - 6
main/ui/src/main/resources/fxml/addvault_new_location.fxml

@@ -10,8 +10,6 @@
 <?import javafx.scene.layout.HBox?>
 <?import javafx.scene.layout.Region?>
 <?import javafx.scene.layout.VBox?>
-<?import javafx.scene.text.Text?>
-<?import javafx.scene.text.TextFlow?>
 <?import org.cryptomator.ui.controls.FontAwesome5IconView?>
 <VBox xmlns="http://javafx.com/javafx"
 	  xmlns:fx="http://javafx.com/fxml"
@@ -48,10 +46,11 @@
 		<VBox spacing="6">
 			<Label text="%addvaultwizard.new.locationLabel" labelFor="$locationTextField"/>
 			<TextField fx:id="locationTextField" promptText="%addvaultwizard.new.locationPrompt" text="${controller.vaultPath}" disable="true" HBox.hgrow="ALWAYS"/>
-			<TextFlow styleClass="text-flow" visible="${controller.showWarning}" prefHeight="22">
-				<FontAwesome5IconView glyph="EXCLAMATION_TRIANGLE"/>
-				<Text text="${controller.warningText}"/>
-			</TextFlow>
+			<Label text="${controller.warningText}" wrapText="true" visible="${controller.showWarning}">
+				<graphic>
+					<FontAwesome5IconView glyph="EXCLAMATION_TRIANGLE"/>
+				</graphic>
+			</Label>
 		</VBox>
 
 		<Region VBox.vgrow="ALWAYS"/>

+ 5 - 6
main/ui/src/main/resources/fxml/addvault_new_name.fxml

@@ -8,8 +8,6 @@
 <?import javafx.scene.layout.HBox?>
 <?import javafx.scene.layout.Region?>
 <?import javafx.scene.layout.VBox?>
-<?import javafx.scene.text.Text?>
-<?import javafx.scene.text.TextFlow?>
 <?import org.cryptomator.ui.controls.FontAwesome5IconView?>
 <VBox xmlns="http://javafx.com/javafx"
 	  xmlns:fx="http://javafx.com/fxml"
@@ -27,10 +25,11 @@
 		<VBox spacing="6">
 			<Label text="%addvaultwizard.new.nameInstruction" labelFor="$textField"/>
 			<TextField fx:id="textField" promptText="%addvaultwizard.new.namePrompt" HBox.hgrow="ALWAYS"/>
-			<TextFlow styleClass="text-flow" visible="${controller.showWarning}" prefHeight="22">
-				<FontAwesome5IconView glyph="EXCLAMATION_TRIANGLE"/>
-				<Text text="${controller.warningText}"/>
-			</TextFlow>
+			<Label text="${controller.warningText}" wrapText="true" visible="${controller.showWarning}">
+				<graphic>
+					<FontAwesome5IconView glyph="EXCLAMATION_TRIANGLE"/>
+				</graphic>
+			</Label>
 		</VBox>
 
 		<Region VBox.vgrow="ALWAYS"/>

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

@@ -35,7 +35,7 @@
 	</StackPane>
 	<Button styleClass="toolbar-button" text="%main.vaultlist.addVaultBtn" onAction="#didClickAddVault" alignment="BASELINE_CENTER" maxWidth="Infinity" mnemonicParsing="false">
 		<graphic>
-			<FontAwesome5IconView glyph="PLUS" glyphSize="15"/>
+			<FontAwesome5IconView glyph="PLUS"/>
 		</graphic>
 	</Button>
 </VBox>