mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-10-05 22:51:35 +00:00
Rework switches
This commit is contained in:
1 file changed
+5
-2
@@ -45,9 +45,12 @@ public class LoadingOverlayComp extends RegionBuilder<StackPane> {
|
||||
}
|
||||
loadingOverlay.getStyleClass().add("loading-comp");
|
||||
|
||||
this.loading.subscribe((v) -> {
|
||||
loadingOverlay.setVisible(this.loading.getValue());
|
||||
loadingOverlay.setManaged(this.loading.getValue());
|
||||
|
||||
this.loading.addListener((observable, oldValue, newValue) -> {
|
||||
// Reduce flickering for consecutive loads
|
||||
if (!v) {
|
||||
if (!newValue) {
|
||||
GlobalTimer.delay(() -> {
|
||||
if (!LoadingOverlayComp.this.loading.getValue()) {
|
||||
Platform.runLater(() -> {
|
||||
|
||||
Reference in new issue
Block a user