fix: 修复二次加载pbo时,翻译进度条变粗的问题

This commit is contained in:
octopus_yan 2024-11-18 17:26:03 +08:00
parent c6ad66bb59
commit cb5e0229ff

View File

@ -14,6 +14,7 @@ import cn.octopusyan.dmt.view.ConsoleLog;
import javafx.application.Platform;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.ObservableList;
import javafx.concurrent.Worker;
import javafx.scene.control.ProgressIndicator;
import org.apache.commons.lang3.StringUtils;
@ -192,7 +193,10 @@ public class MainViewModel extends BaseViewModel<MainController> {
private void resetProgress() {
translateTask = null;
controller.translate.setGraphic(startIcon);
ObservableList<String> styleClass = controller.translateProgress.getStyleClass();
if (!styleClass.contains(Styles.SMALL)) {
Styles.toggleStyleClass(controller.translateProgress, Styles.SMALL);
}
controller.translateProgress.progressProperty().unbind();
controller.translateProgress.setProgress(0);
controller.translateProgress.setVisible(false);