added progress bar

This commit is contained in:
Tobias Hagemann
2019-10-08 01:06:50 +02:00
parent 5af5a6c5b0
commit 7adaf44fb3
3 changed files with 60 additions and 1 deletions

View File

@@ -80,6 +80,7 @@
INDICATOR_BG: RED_5;
PROGRESS_INDICATOR_BEGIN: GRAY_7;
PROGRESS_INDICATOR_END: GRAY_5;
PROGRESS_BAR_BG: GRAY_2;
PASSWORD_STRENGTH_INDICATOR_BG: GRAY_3;
PASSWORD_STRENGTH_INDICATOR_BG_STRENGTH_0: RED_5;
PASSWORD_STRENGTH_INDICATOR_BG_STRENGTH_1: ORANGE_5;
@@ -780,3 +781,31 @@
.progress-indicator:indeterminate .segment11 {
-fx-shape:"m 14.321262,6.5816808 c -0.824944,0.3797564 -0.10368,1.8484772 0.718513,1.3544717 L 18.786514,5.9486042 C 19.644992,5.4932031 18.92648,4.1387308 18.068001,4.5941315 z";
}
/*******************************************************************************
* *
* ProgressBar *
* *
******************************************************************************/
.progress-bar {
-fx-indeterminate-bar-length: 100;
-fx-indeterminate-bar-escape: true;
-fx-indeterminate-bar-flip: true;
-fx-indeterminate-bar-animation-time: 2;
}
.progress-bar > .bar {
-fx-background-color: CONTROL_PRIMARY_BG_NORMAL;
-fx-background-radius: 4px;
-fx-padding: 0.5em;
}
.progress-bar:indeterminate > .bar {
-fx-background-color: linear-gradient(to left, transparent, CONTROL_PRIMARY_BG_NORMAL);
}
.progress-bar > .track {
-fx-background-color: PROGRESS_BAR_BG;
-fx-background-radius: 4px;
}

View File

@@ -80,6 +80,7 @@
INDICATOR_BG: RED_5;
PROGRESS_INDICATOR_BEGIN: GRAY_2;
PROGRESS_INDICATOR_END: GRAY_4;
PROGRESS_BAR_BG: GRAY_8;
PASSWORD_STRENGTH_INDICATOR_BG: GRAY_5;
PASSWORD_STRENGTH_INDICATOR_BG_STRENGTH_0: RED_5;
PASSWORD_STRENGTH_INDICATOR_BG_STRENGTH_1: ORANGE_5;
@@ -780,3 +781,31 @@
.progress-indicator:indeterminate .segment11 {
-fx-shape:"m 14.321262,6.5816808 c -0.824944,0.3797564 -0.10368,1.8484772 0.718513,1.3544717 L 18.786514,5.9486042 C 19.644992,5.4932031 18.92648,4.1387308 18.068001,4.5941315 z";
}
/*******************************************************************************
* *
* ProgressBar *
* *
******************************************************************************/
.progress-bar {
-fx-indeterminate-bar-length: 100;
-fx-indeterminate-bar-escape: true;
-fx-indeterminate-bar-flip: true;
-fx-indeterminate-bar-animation-time: 2;
}
.progress-bar > .bar {
-fx-background-color: CONTROL_PRIMARY_BG_NORMAL;
-fx-background-radius: 4px;
-fx-padding: 0.5em;
}
.progress-bar:indeterminate > .bar {
-fx-background-color: linear-gradient(to left, transparent, CONTROL_PRIMARY_BG_NORMAL);
}
.progress-bar > .track {
-fx-background-color: PROGRESS_BAR_BG;
-fx-background-radius: 4px;
}

View File

@@ -3,6 +3,7 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ButtonBar?>
<?import javafx.scene.control.ProgressBar?>
<?import javafx.scene.control.ProgressIndicator?>
<?import javafx.scene.layout.VBox?>
<?import org.cryptomator.ui.controls.FormattedLabel?>
@@ -23,7 +24,7 @@
<NiceSecurePasswordField fx:id="passwordField"/>
</VBox>
<!-- TODO add a progress bar... -->
<ProgressBar progress="${controller.migrationProgress}" prefWidth="Infinity"/>
<FormattedLabel format="progress: %.3f" arg1="${controller.migrationProgress}"/>
<VBox alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS">