replaced text-flow with label+graphic

This commit is contained in:
Tobias Hagemann
2019-09-04 16:54:40 +02:00
parent 31bad3191d
commit 9c104beeba
3 changed files with 11 additions and 13 deletions

View File

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

View File

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

View File

@@ -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>