mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-15 23:06:07 -04:00
feat: smooth scrolling.
This commit is contained in:
parent
c54a3f2053
commit
5b02393c79
@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.jackhuang.hmcl.ui.main;
|
package org.jackhuang.hmcl.ui.main;
|
||||||
|
|
||||||
|
import com.jfoenix.controls.JFXScrollPane;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.scene.control.ScrollPane;
|
import javafx.scene.control.ScrollPane;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
@ -169,9 +170,9 @@ public class AboutPage extends StackPane {
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
ScrollPane scrollPane = new ScrollPane();
|
ScrollPane scrollPane = new ScrollPane(content);
|
||||||
scrollPane.setContent(content);
|
|
||||||
scrollPane.setFitToWidth(true);
|
scrollPane.setFitToWidth(true);
|
||||||
|
JFXScrollPane.smoothScrolling(scrollPane);
|
||||||
getChildren().setAll(scrollPane);
|
getChildren().setAll(scrollPane);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ public class DownloadSettingsPage extends StackPane {
|
|||||||
content.setPadding(new Insets(10));
|
content.setPadding(new Insets(10));
|
||||||
content.setFillWidth(true);
|
content.setFillWidth(true);
|
||||||
ScrollPane scrollPane = new ScrollPane(content);
|
ScrollPane scrollPane = new ScrollPane(content);
|
||||||
|
JFXScrollPane.smoothScrolling(scrollPane);
|
||||||
scrollPane.setFitToWidth(true);
|
scrollPane.setFitToWidth(true);
|
||||||
getChildren().setAll(scrollPane);
|
getChildren().setAll(scrollPane);
|
||||||
|
|
||||||
|
@ -19,7 +19,9 @@ package org.jackhuang.hmcl.ui.main;
|
|||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.jfoenix.controls.JFXScrollPane;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
|
import javafx.scene.control.ScrollPane;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import org.jackhuang.hmcl.Metadata;
|
import org.jackhuang.hmcl.Metadata;
|
||||||
import org.jackhuang.hmcl.task.Schedulers;
|
import org.jackhuang.hmcl.task.Schedulers;
|
||||||
@ -43,7 +45,10 @@ public class HelpPage extends SpinnerPane {
|
|||||||
content.setPadding(new Insets(10));
|
content.setPadding(new Insets(10));
|
||||||
content.setSpacing(10);
|
content.setSpacing(10);
|
||||||
content.setFillWidth(true);
|
content.setFillWidth(true);
|
||||||
setContent(content);
|
ScrollPane scrollPane = new ScrollPane(content);
|
||||||
|
scrollPane.setFitToWidth(true);
|
||||||
|
JFXScrollPane.smoothScrolling(scrollPane);
|
||||||
|
setContent(scrollPane);
|
||||||
|
|
||||||
IconedTwoLineListItem docPane = new IconedTwoLineListItem();
|
IconedTwoLineListItem docPane = new IconedTwoLineListItem();
|
||||||
docPane.setTitle(i18n("help.doc"));
|
docPane.setTitle(i18n("help.doc"));
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.jackhuang.hmcl.ui.main;
|
package org.jackhuang.hmcl.ui.main;
|
||||||
|
|
||||||
|
import com.jfoenix.controls.JFXScrollPane;
|
||||||
import com.jfoenix.controls.JFXTextField;
|
import com.jfoenix.controls.JFXTextField;
|
||||||
import com.jfoenix.effects.JFXDepthManager;
|
import com.jfoenix.effects.JFXDepthManager;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
@ -52,6 +53,7 @@ public class PersonalizationPage extends StackPane {
|
|||||||
content.setPadding(new Insets(10));
|
content.setPadding(new Insets(10));
|
||||||
content.setFillWidth(true);
|
content.setFillWidth(true);
|
||||||
ScrollPane scrollPane = new ScrollPane(content);
|
ScrollPane scrollPane = new ScrollPane(content);
|
||||||
|
JFXScrollPane.smoothScrolling(scrollPane);
|
||||||
scrollPane.setFitToWidth(true);
|
scrollPane.setFitToWidth(true);
|
||||||
getChildren().setAll(scrollPane);
|
getChildren().setAll(scrollPane);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user