feat: smooth scrolling.

This commit is contained in:
huanghongxun 2021-09-19 01:35:27 +08:00
parent c54a3f2053
commit 5b02393c79
4 changed files with 12 additions and 3 deletions

View File

@ -17,6 +17,7 @@
*/
package org.jackhuang.hmcl.ui.main;
import com.jfoenix.controls.JFXScrollPane;
import javafx.geometry.Insets;
import javafx.scene.control.ScrollPane;
import javafx.scene.image.Image;
@ -169,9 +170,9 @@ public class AboutPage extends StackPane {
);
ScrollPane scrollPane = new ScrollPane();
scrollPane.setContent(content);
ScrollPane scrollPane = new ScrollPane(content);
scrollPane.setFitToWidth(true);
JFXScrollPane.smoothScrolling(scrollPane);
getChildren().setAll(scrollPane);
}
}

View File

@ -48,6 +48,7 @@ public class DownloadSettingsPage extends StackPane {
content.setPadding(new Insets(10));
content.setFillWidth(true);
ScrollPane scrollPane = new ScrollPane(content);
JFXScrollPane.smoothScrolling(scrollPane);
scrollPane.setFitToWidth(true);
getChildren().setAll(scrollPane);

View File

@ -19,7 +19,9 @@ package org.jackhuang.hmcl.ui.main;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import com.jfoenix.controls.JFXScrollPane;
import javafx.geometry.Insets;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.VBox;
import org.jackhuang.hmcl.Metadata;
import org.jackhuang.hmcl.task.Schedulers;
@ -43,7 +45,10 @@ public class HelpPage extends SpinnerPane {
content.setPadding(new Insets(10));
content.setSpacing(10);
content.setFillWidth(true);
setContent(content);
ScrollPane scrollPane = new ScrollPane(content);
scrollPane.setFitToWidth(true);
JFXScrollPane.smoothScrolling(scrollPane);
setContent(scrollPane);
IconedTwoLineListItem docPane = new IconedTwoLineListItem();
docPane.setTitle(i18n("help.doc"));

View File

@ -17,6 +17,7 @@
*/
package org.jackhuang.hmcl.ui.main;
import com.jfoenix.controls.JFXScrollPane;
import com.jfoenix.controls.JFXTextField;
import com.jfoenix.effects.JFXDepthManager;
import javafx.application.Platform;
@ -52,6 +53,7 @@ public class PersonalizationPage extends StackPane {
content.setPadding(new Insets(10));
content.setFillWidth(true);
ScrollPane scrollPane = new ScrollPane(content);
JFXScrollPane.smoothScrolling(scrollPane);
scrollPane.setFitToWidth(true);
getChildren().setAll(scrollPane);