mirror of
https://github.com/cryptomator/cryptomator.git
synced 2024-11-23 03:59:51 +00:00
replace static icon in vault detail screen by statusView
This commit is contained in:
parent
91162d3d8f
commit
b256670bcc
@ -33,6 +33,12 @@ public class FontAwesome5StatusView extends Label {
|
||||
animatedSpinner.glyphSizeProperty().bind(glyphSize);
|
||||
|
||||
EasyBind.subscribe(glyphProperty(), this::spinnerOrIcon);
|
||||
EasyBind.subscribe(glyphSize, this::shrinkToGlyphSize);
|
||||
}
|
||||
|
||||
private void shrinkToGlyphSize(Number newValue) {
|
||||
double sizeInPx = newValue.doubleValue() * 1.333;
|
||||
setMaxSize(sizeInPx, sizeInPx);
|
||||
}
|
||||
|
||||
private void spinnerOrIcon(FontAwesome5Icon icon) {
|
||||
|
@ -804,6 +804,18 @@
|
||||
-fx-scale-shape: false;
|
||||
}
|
||||
|
||||
/**
|
||||
statusView
|
||||
**/
|
||||
|
||||
.status-view-white .glyph-icon {
|
||||
-fx-fill: white;
|
||||
}
|
||||
|
||||
.status-view-white .progress-indicator .segment {
|
||||
-fx-background-color: white;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* *
|
||||
* ProgressIndicator *
|
||||
|
@ -802,6 +802,18 @@
|
||||
-fx-scale-shape: false;
|
||||
}
|
||||
|
||||
/**
|
||||
statusView
|
||||
**/
|
||||
|
||||
.status-view-white .glyph-icon {
|
||||
-fx-fill: white;
|
||||
}
|
||||
|
||||
.status-view-white .progress-indicator .segment {
|
||||
-fx-background-color: white;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* *
|
||||
* ProgressIndicator *
|
||||
|
@ -10,6 +10,7 @@
|
||||
<?import javafx.scene.layout.StackPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.shape.Circle?>
|
||||
<?import org.cryptomator.ui.controls.FontAwesome5StatusView?>
|
||||
<VBox xmlns:fx="http://javafx.com/fxml"
|
||||
xmlns="http://javafx.com/javafx"
|
||||
fx:controller="org.cryptomator.ui.mainwindow.VaultDetailController"
|
||||
@ -22,7 +23,7 @@
|
||||
<HBox spacing="12" visible="${controller.anyVaultSelected}" managed="${controller.anyVaultSelected}">
|
||||
<StackPane alignment="CENTER">
|
||||
<Circle styleClass="glyph-icon-primary" radius="16"/>
|
||||
<FontAwesome5IconView styleClass="glyph-icon-white" glyph="${controller.glyph}" HBox.hgrow="NEVER" glyphSize="16"/>
|
||||
<FontAwesome5StatusView styleClass="status-view-white" glyph="${controller.glyph}" glyphSize="16"/>
|
||||
</StackPane>
|
||||
<VBox spacing="4" HBox.hgrow="ALWAYS">
|
||||
<HBox spacing="12">
|
||||
|
Loading…
Reference in New Issue
Block a user